VVV: npm install fails when creating custom development template site
When provisioning a new site using custom-site-template-development, I have been able to reliably reproduce this an issue where the site shows a 403 forbidden error from NGINX after provisioning completes.
This seems to be caused by the build folder being empty (except an empty wp-content/mu-plugins folder). npm install returns the following error:
26490 verbose cwd /srv/www/trunk/public_html
26491 verbose Linux 4.15.0-45-generic
26492 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
26493 verbose node v11.15.0
26494 verbose npm v6.9.0
26495 error path /srv/www/trunk/public_html/node_modules/anymatch/node_modules/expand-brackets/node_modules/kind-of/package.json.3433542754
26496 error code ENOENT
26497 error errno -2
26498 error syscall open
26499 error enoent ENOENT: no such file or directory, open '/srv/www/trunk/public_html/node_modules/anymatch/node_modules/expand-brackets/node_modules/kind-of/package.json.3433542754'
26500 error enoent This is related to npm not being able to find a file.
26501 verbose exit [ -2, true ]
Running npm install and grunt build in the site’s folder in terminal outside of the VM fixes the issue.
Running MacOS (10.12.6) using the develop branch.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (13 by maintainers)
And there is a fix 😃 https://github.com/Varying-Vagrant-Vagrants/custom-site-template-develop/pull/9