freenet-core
freenet-core copied to clipboard
fix n / npm freenet install script on debian
according to https://stackoverflow.com/questions/4938592/how-why-does-npm-recommend-not-running-as-root, we now can run npm with root.
I suggest to add the commands
sudo apt install --yes npm
sudo npm install -g n
sudo n latest
npm install -g typescript webpack
before:
if [ "$EUID" -ne 0 ]
then
~/n/bin/n latest ;
~/n/bin/npm install -g typescript webpack
echo 'PATH="~/n/bin/:$PATH"' >> ~/.bashrc
else
/usr/local/n latest ;
/usr/local/n/bin/npm install -g typescript webpack
fi
also: npm install -g typescript webpack webpack-cli
I don’t think we should be trying to install anything as root unless we can’t help it, is a poor practice.