An actually working nodejs debian package

Needs the jessie repo
This commit is contained in:
Bob Mottram 2017-06-04 12:46:32 +01:00
parent f78f19ca72
commit 86d5e5d696
1 changed files with 10 additions and 2 deletions

View File

@ -44,6 +44,10 @@ NPM_VERSION='4.0.5'
NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps
function mesh_install_nodejs {
# Note: this has to be jessie for now
echo "deb https://deb.nodesource.com/node_6.x jessie main" > ${rootdir}/etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/node_6.x jessie main" >> ${rootdir}/etc/apt/sources.list.d/nodesource.list
chroot "${rootdir}" apt-get update
chroot "${rootdir}" apt-get -yq install nodejs curl
if [ ! -f ${rootdir}/usr/bin/nodejs ]; then
@ -136,8 +140,12 @@ function install_nodejs {
return
fi
apt-get -yq install nodejs
apt-get -yq install npm curl
# Note: this has to be jessie for now
echo "deb https://deb.nodesource.com/node_6.x jessie main" > /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/node_6.x jessie main" >> /etc/apt/sources.list.d/nodesource.list
apt-get update
apt-get -yq install nodejs curl
if [ ! -f /usr/bin/nodejs ]; then
echo $'nodejs was not installed'