From 098e2692611a9aae90387f9e9708d379732c0218 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 10 Nov 2016 14:59:48 +0000 Subject: [PATCH] Ensure npm version is installed --- src/freedombone-app-jitsi | 4 ++++ src/freedombone-utils-nodejs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-jitsi b/src/freedombone-app-jitsi index 6cbdf7f5..05e635b7 100755 --- a/src/freedombone-app-jitsi +++ b/src/freedombone-app-jitsi @@ -223,6 +223,10 @@ function install_jitsi { apt-get -yq install wget debconf-utils default-jre install_nodejs jitsi npm install -g browserify@13.1.1 + if [ ! "$?" = "0" ]; then + remove_nodejs jitsi + exit 638352 + fi if ! grep "jitsi" /etc/apt/sources.list; then echo "deb http://download.jitsi.org/nightly/deb ${jitsi_deb_repo}/" >> /etc/apt/sources.list fi diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 8a62ae88..9d40d680 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -129,9 +129,10 @@ NODE_PATH="/usr/lib/node_modules" cp /usr/bin/nodejs /usr/local/bin/node cp /usr/bin/nodejs /usr/bin/node /usr/bin/curl -0 -L https://npmjs.org/install.sh | sh +npm install -g npm@{NPM_VERSION} npm install -g n@${NODEJS_N_VERSION} --save n ${NODEJS_VERSION} -npm update -g npm@{NPM_VERSION} +npm upgrade -g npm@{NPM_VERSION} npm install -g pug@2.0.0-beta6 npm install -g graceful-fs@4.1.10 npm install -g minimatch@3.0.3