wporg-developer icon indicating copy to clipboard operation
wporg-developer copied to clipboard

Unable to build after following instruction

Open dmsnell opened this issue 2 years ago • 7 comments

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?

dmsnell avatar Nov 14 '23 21:11 dmsnell

~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.

adamwoodnz avatar Nov 16 '23 20:11 adamwoodnz

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?

adamwoodnz avatar Nov 16 '23 21:11 adamwoodnz

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)

dmsnell avatar Nov 16 '23 21:11 dmsnell

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>...]

dmsnell avatar Nov 16 '23 21:11 dmsnell

Is subversion an implicit dependency?

Yes, it should be listed.

StevenDufresne avatar Nov 17 '23 03:11 StevenDufresne

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.

adamwoodnz avatar Dec 06 '23 01:12 adamwoodnz

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

adamwoodnz avatar Dec 11 '23 04:12 adamwoodnz