Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_modules folder inside host, not symlinked #33

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
7 changes: 5 additions & 2 deletions provision/vvv-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ function try_npm_install() {
nvm use
fi
echo " * Running npm install after svn up/git pull"
mkdir -p ~/wp-develop-node_modules
Mte90 marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p ./node_modules
mount --bind ~/wp-develop-node_modules ./node_modules
# Grunt can crash because doesn't find a folder, the workaround is remove the node_modules folder and download all the dependencies again.
npm_config_loglevel=error npm install --no-optional
PUPPETEER_SKIP_DOWNLOAD='true' npm_config_loglevel=error npm install --no-optional
Mte90 marked this conversation as resolved.
Show resolved Hide resolved
echo " * Checking npm install result"
if [ $? -eq 1 ]; then
echo " ! Issues encounteed, here's the output:"
Expand All @@ -131,7 +134,7 @@ function try_npm_install() {
echo " * Clearing npm cache"
npm_config_loglevel=error npm cache clean --force
echo " * Running npm install again"
npm_config_loglevel=error noroot npm install --no-optional --force
PUPPETEER_SKIP_DOWNLOAD='true' npm_config_loglevel=error noroot npm install --no-optional --force
Mte90 marked this conversation as resolved.
Show resolved Hide resolved
echo " * Completed npm install command, check output for issues"
fi
echo " * Finished running npm install"
Expand Down