freenet-core icon indicating copy to clipboard operation
freenet-core copied to clipboard

fix n / npm freenet install script on debian

Open gogo2464 opened this issue 1 year ago • 1 comments

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

gogo2464 avatar Aug 10 '24 11:08 gogo2464

also: npm install -g typescript webpack webpack-cli

gogo2464 avatar Aug 17 '24 17:08 gogo2464

I don’t think we should be trying to install anything as root unless we can’t help it, is a poor practice.

iduartgomez avatar Sep 22 '24 14:09 iduartgomez