photoprism/scripts/init/install-nodejs.sh

14 lines
381 B
Bash
Raw Normal View History

2022-02-17 13:54:42 +01:00
#!/usr/bin/env bash
# abort if the user is not root
if [[ $(id -u) != "0" ]]; then
echo "Usage: run install-nodejs.sh as root" 1>&2
exit 1
fi
# install from nodesource.com
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get update && apt-get -qq install nodejs
npm install --unsafe-perm=true --allow-root -g npm
npm config set cache ~/.cache/npm
2022-02-18 17:40:58 +01:00
echo "Installed."