Specify npm version

This commit is contained in:
Bob Mottram 2017-09-12 18:50:14 +01:00
parent 1fd767b7c3
commit cd143fdefc
2 changed files with 10 additions and 6 deletions

View File

@ -572,13 +572,17 @@ install_patchwork() {
echo $'/usr/bin/node not found'
exit 7235728
fi
wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
if [ ! -f $rootdir/root/npm_install.sh ]; then
echo $'Unable to download npm installer'
exit 8793636
if [ -f /usr/share/npm/bin/npm-cli.js ]; then
ln -s /usr/share/npm/bin/npm-cli.js /usr/bin/npm
else
wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
if [ ! -f $rootdir/root/npm_install.sh ]; then
echo $'Unable to download npm installer'
exit 8793636
fi
fi
chroot "$rootdir" chmod +x /root/npm_install.sh
chroot "$rootdir" /root/npm_install.sh
chroot "$rootdir" /root/npm_install.sh $NPM_VERSION
git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork

View File

@ -35,7 +35,7 @@ VARIANTS='mesh'
# change these versions at your peril. Things will often crash if you don't
# have specifically the correct versions
NODEJS_VERSION='6.10.1'
NODEJS_VERSION='6.11.3'
NODEJS_N_VERSION='2.1.7'
NPM_VERSION='4.0.5'