I have having a bit of an issue with installing nodejs and npm on my linux server (which is a pi running raspbian). I had everything set up and running using
su
I wrote in the terminal the following command lines I hope it is useful for the community.
$ sudo apt install nodejs $ curl -L https://npmjs.org/install.sh | sudo sh
good luck!