Unable to build after following instruction
I've been trying to get this project to build and I keep running into problems.
First, the instructions say to run yarn setup:tools but skip mentioning the need to run yarn install.
Second, when I run yarn setup:tools it finishes with the following warning:
In SvnDownloader.php line 39:
svn was not found in your PATH, skipping source download
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
I tried continuing with yarn wp-env start but it failed with this message:
✖ Error while running docker-compose command.
Container 0051fae635c818a5612f969e6d6e717b-mysql-1 Running
Container 0051fae635c818a5612f969e6d6e717b-wordpress-1 Running
[14-Nov-2023 21:10:12 UTC] PHP Warning: require_once(/var/www/html/wp-content/mu-plugins/wporg-mu-plugins/mu-plugins/loader.php): Failed to open stream: No such file or directory in /var/www/html/wp-content/mu-plugins/0-sandbox.php on line 10
Warning: require_once(/var/www/html/wp-content/mu-plugins/wporg-mu-plugins/mu-plugins/loader.php): Failed to open stream: No such file or directory in /var/www/html/wp-content/mu-plugins/0-sandbox.php on line 10
[14-Nov-2023 21:10:12 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/wp-content/mu-plugins/wporg-mu-plugins/mu-plugins/loader.php' (include_path='.:/usr/local/lib/php') in /var/www/html/wp-content/mu-plugins/0-sandbox.php:10
Stack trace:
#0 /var/www/html/wp-settings.php(398): include_once()
#1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1363): require('/var/www/html/w...')
#2 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1282): WP_CLI\Runner->load_wordpress()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#6 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('phar:///usr/loc...')
#7 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#8 {main}
thrown in /var/www/html/wp-content/mu-plugins/0-sandbox.php on line 10
Fatal error: Uncaught Error: Failed opening required '/var/www/html/wp-content/mu-plugins/wporg-mu-plugins/mu-plugins/loader.php' (include_path='.:/usr/local/lib/php') in /var/www/html/wp-content/mu-plugins/0-sandbox.php:10
Stack trace:
#0 /var/www/html/wp-settings.php(398): include_once()
#1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1363): require('/var/www/html/w...')
#2 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1282): WP_CLI\Runner->load_wordpress()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#6 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('phar:///usr/loc...')
#7 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#8 {main}
thrown in /var/www/html/wp-content/mu-plugins/0-sandbox.php on line 10
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
Is subversion an implicit dependency?
~Hi I've added the yarn step to the read me now, thanks for that.~
Reverted this as it's included in the setup:tools script.
Is subversion an implicit dependency?
I'm not an expert in how this works, but sounds like composer is failing to install dependencies using svn. Can you run composer install successfully?
Reverted this as it's included in the setup:tools script.
This still fails if one doesn't run yarn install first.
Error message
dmsnell@Magneto ~/c/w/wporg-developer (trunk)> yarn setup:tools
Internal Error: wporg-developer@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at V0.getCandidates (/Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:435:5145)
at kf.getCandidates (/Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:391:1264)
at /Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:439:8033
at df (/Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:390:11070)
at ge (/Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:439:8013)
at async Promise.allSettled (index 0)
at async io (/Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:390:10398)
at async /Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:439:8545
at async ti.startProgressPromise (/Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:390:47579)
at async je.resolveEverything (/Users/dmsnell/.volta/tools/image/yarn/3.6.3/bin/yarn.js:439:6573)
Can you run composer install successfully?
Thanks @adamwoodnz - no it fails with the same message.
Composer error message
dmsnell@Magneto ~/c/w/wporg-developer (trunk) [1]> composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 53 installs, 0 updates, 0 removals
In SvnDownloader.php line 39:
svn was not found in your PATH, skipping source download
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
Is subversion an implicit dependency?
Yes, it should be listed.
My local env broke and I'm now seeing this error trying to set up as well. I haven't seen this in our other repos.
Turns out I was unable to composer install due to a broken svn installation after I switched to a homebrew install. I uninstalled and reinstalled svn and things were back to normal.
cc @dmsnell