Skip to content
Snippets Groups Projects
Commit 08e772ee authored by Bob Mottram's avatar Bob Mottram
Browse files

Tidying of nodejs install

parent bd795f62
No related branches found
No related tags found
No related merge requests found
......@@ -117,25 +117,6 @@ function mesh_install_nodejs {
exit 7235728
fi
#$mesh_install_nodejs_prefix wget https://www.npmjs.com/install.sh -O /root/npm_install.sh
#if [ ! -f $rootdir/root/npm_install.sh ]; then
# echo $'Unable to download npm installer'
# exit 8793636
#fi
#if ! grep -q "t=\"\${npm_install}\"" $rootdir/root/npm_install.sh; then
# echo $'Unable to set npm version within npm_install.sh'
# exit 629052
#fi
#$mesh_install_nodejs_prefix chmod +x /root/npm_install.sh
#$mesh_install_nodejs_prefix sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" /root/npm_install.sh
#$mesh_install_nodejs_prefix /root/npm_install.sh
#
#if [ ! -f $rootdir/usr/bin/npm ]; then
# echo $'npm was not installed'
# exit 5290462
#fi
#cp $rootdir/usr/bin/npm $rootdir/root/npm
get_npm_arch
$mesh_install_nodejs_prefix npm config set unsafe-perm true
......@@ -226,48 +207,7 @@ function install_nodejs {
rootdir=
mesh_install_nodejs
#if [ ! -f /usr/bin/nodejs ]; then
# wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /root/node.gpg.key
# apt-key add /root/node.gpg.key
# echo "deb https://deb.nodesource.com/node_6.x stretch main" > /etc/apt/sources.list.d/nodesource.list
# echo "deb-src https://deb.nodesource.com/node_6.x stretch main" >> /etc/apt/sources.list.d/nodesource.list
# apt-get update
# apt-get -yq remove --purge nodejs
# if [ -d /usr/local/lib/node_modules ]; then
# rm -rf /usr/local/lib/node_modules
# fi
# if [ -f /usr/local/bin/node ]; then
# rm /usr/local/bin/node
# fi
# if [ -f /usr/bin/node ]; then
# rm /usr/bin/node
# fi
# if [ -f /usr/bin/nodejs ]; then
# rm /usr/bin/nodejs
# fi
# apt-get -yq install nodejs
# apt-get -yq install curl
# if [ ! -f /usr/bin/nodejs ]; then
# echo $'nodejs was not installed'
# exit 63962
# fi
#fi
#npm install -g npm@${NPM_VERSION} --save
#npm install -g n@${NODEJS_N_VERSION} --save
#n ${NODEJS_VERSION}
#npm install -g pug@2.0.0-beta6 --save
#npm install -g graceful-fs@4.1.10 --save
#npm install -g minimatch@3.0.3 --save
# node seems tricky so here we're going to double check
# that the versions we expect did get installed
# verify nodejs versions are what we expect
CURR_NODE_VERSION=$(node --version)
CURR_NPM_VERSION=$(npm --version)
CURR_N_VERSION=$(n --version)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment