From 0ed95a06913c6927a878c05e209fd88e8fb8a539 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Apr 2018 17:07:08 +0100 Subject: [PATCH] More npm copying --- src/freedombone-utils-nodejs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index df3ab532..4a2c8a4f 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -164,19 +164,20 @@ function mesh_install_nodejs { nodejs_setup_global_modules nodejs_fix_cpu_detection $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save + if [ -f "$rootdir/.npm-global/bin/npm" ]; then + cp "$rootdir/.npm-global/bin/npm" "$rootdir/usr/local/bin/npm" + cp "$rootdir/.npm-global/bin/npm" "$rootdir/usr/bin/npm" + fi if [ -f "$rootdir/usr/local/bin/npm" ]; then cp "$rootdir/usr/local/bin/npm" "$rootdir/usr/bin/npm" fi cp "$rootdir/usr/bin/npm" "$rootdir/root/npm" - # deliberately called again - nodejs_fix_cpu_detection - # update from the old debian nodejs version $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save $mesh_install_nodejs_prefix n --arch $N_ARCH ${NODEJS_VERSION} cp "$rootdir/root/npm" "$rootdir/usr/bin/npm" - + cp "$rootdir/root/npm" "$rootdir/usr/local/bin/npm" # deliberate second install of npm $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save