From 4800b7c82846a580fef2fbc94714d073e34ee9d3 Mon Sep 17 00:00:00 2001 From: Kerry Liu Date: Fri, 23 Aug 2019 09:18:54 -0700 Subject: [PATCH] Revert "Build: remove global install of latest npm since we want to use the paired node/npm version (#17134)" This reverts commit 0b4d9c805fb764c1ba05ebe999c76e2bf0452be6. --- .travis.yml | 2 +- bin/install-node-nvm.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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