Remove old npm directory

This commit is contained in:
Bob Mottram 2017-06-04 14:56:49 +01:00
parent 4a67b64d35
commit ff52a2f214
1 changed files with 6 additions and 0 deletions

View File

@ -176,6 +176,12 @@ function install_nodejs {
npm install -g minimatch@3.0.3 --save
# second npm install attempt seems necessary
if [ -f /usr/local/lib/node_modules/npm ]; then
rm -rf /usr/local/lib/node_modules/npm
fi
if [ -d /usr/local/lib/node_modules/npm ]; then
rm -rf /usr/local/lib/node_modules/npm
fi
npm install -g npm@${NPM_VERSION} --save
cp /usr/local/bin/npm /usr/bin/npm