diff --git a/.travis.yml b/.travis.yml index 3e16c463eb6ed5..9a414f619ff17c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ branches: - master before_install: - - nvm install + - nvm install --latest-npm env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true diff --git a/bin/install-node-nvm.sh b/bin/install-node-nvm.sh index d9cd1a6faf5102..9edc083833dc1d 100755 --- a/bin/install-node-nvm.sh +++ b/bin/install-node-nvm.sh @@ -69,6 +69,9 @@ fi echo -e $(status_message "Installing and updating NPM packages..." ) npm install +# Make sure npm is up-to-date +npm install npm -g + # There was a bug in NPM that caused changes in package-lock.json. Handle that. if [ "$TRAVIS" != "true" ] && ! git diff --no-ext-diff --exit-code package-lock.json >/dev/null; then if ask "$(warning_message "Your package-lock.json changed, which may mean there's an issue with your NPM cache. Would you like to try and automatically clean it up?" )" N 10; then