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