Remove old npm directory

This commit is contained in:
Bob Mottram 2017-06-04 14:58:37 +01:00
parent ff52a2f214
commit 3257c8658f
1 changed files with 6 additions and 0 deletions

View File

@ -166,6 +166,12 @@ function install_nodejs {
fi fi
cp /usr/local/bin/node /usr/bin/nodejs cp /usr/local/bin/node /usr/bin/nodejs
cp /usr/local/bin/node /usr/bin/node cp /usr/local/bin/node /usr/bin/node
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 npm install -g npm@${NPM_VERSION} --save
if [ ! -f /usr/local/bin/npm ]; then if [ ! -f /usr/local/bin/npm ]; then
exit 3 exit 3