You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it starts the Codespace successfully but setup.sh seems to be running before npm is ready or something, though I do get /var/www/.nvm/versions/node/v14.17.6/bin/npm when I run which npm. The script is clearly not catching failures correctly because it continues on when it shouldn't, but for the moment that's helpful because we then see that mysql is not available as a command.
setup.log output (the PHP warnings at the end are from the build process not having run):
/workspaces/wordpress-develop/.devcontainer/setup.sh: line 18: npm: command not found
Setting up WordPress at https://helen-upgraded-space-waddle-q774jq9j5x24gxj-8080.preview.app.github.dev
Error: Failed to get current SQL modes. Reason: /usr/bin/env: 'mysql': No such file or directory
Success: WordPress installed successfully.
[17-Nov-2022 04:20:48 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port) :-(
[17-Nov-2022 04:20:49 UTC] PHP Warning: include(/var/www/html/wp-includes/assets/script-loader-react-refresh-entry.php): failed to open stream: No such file or directory in /var/www/html/wp-includes/script-loader.php on line 241
[17-Nov-2022 04:20:49 UTC] PHP Warning: include(): Failed opening '/var/www/html/wp-includes/assets/script-loader-react-refresh-entry.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/wp-includes/script-loader.php on line 241
[17-Nov-2022 04:20:49 UTC] PHP Warning: include(/var/www/html/wp-includes/assets/script-loader-packages.php): failed to open stream: No such file or directory in /var/www/html/wp-includes/script-loader.php on line 276
[17-Nov-2022 04:20:49 UTC] PHP Warning: include(): Failed opening '/var/www/html/wp-includes/assets/script-loader-packages.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/wp-includes/script-loader.php on line 276
[17-Nov-2022 04:20:49 UTC] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/wp-includes/script-loader.php on line 278
Oddly though, if I then run npm install && npm run build:dev myself from /workspaces/wordpress-develop it succeeds and everything is up and running. wp-cli is clearly working as is the DB, for instance:
www-data@ab39145bb8ea:/workspaces/wordpress-develop$ wp option get siteurl
[17-Nov-2022 04:48:47 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port) :-(
https://helen-upgraded-space-waddle-q774jq9j5x24gxj-8080.preview.app.github.dev
Interactive mode worked, thanks to @wirecat and @sam1el for the look and suggestion! Now just some cruft that only shows in setup.log so for the moment I think we can move to the "what's the right container strategy" part. This takes forever and a day to finish running (or I'm very impatient) - we should probably output more to let users know when setup is complete rather than swallowing it all into the log. Pre-builds will also figure into this I think but still.
## snipped npm install+build output ##
Done.
Setting up WordPress at https://helen-literate-tribble-7vv569r4q73pxp4-8080.preview.app.github.dev
Error: Failed to get current SQL modes. Reason: /usr/bin/env: 'mysql': No such file or directory
Success: WordPress installed successfully.
t_host/xdebug.client_port) :-(
[18-Nov-2022 01:31:58 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port) :-(
I have now switched this to building from a custom Dockerfile in /.devcontainer for ease of iteration and also to kinda prove out that that can be an option if the correct thing to do in terms of containers/Docker images is more baseline. Currently using the Docker-published wordpress one; IMO the more correct-seeming thing is use the wordpressdevelop-published ones.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening a PR so I can track / talk to myself.
Todo:
workspaceFolderas for core dev you're using the top level repowww-datauser?setup.logto.gitignore