Installing NPM from NodeJS source
- Download nodejs source: http://nodejs.org/download/
- Decompress it:
tar zxvf node-x.y.z.tar.gz
- Enter the deps/npm directory:
- Run the standard install process:
./configure make sudo make install
You can also use `make latest` to install the latest version of npm. Using `make install` or `make link`install npm from the source directory.
The docs for npm mention that but don’t tell you how to install npm system-wide. They simply recommend you download some random shell script and run it. Downloading and running a shell script directly from the internet is a dangerous proposition and something you should never ever ever ever ever ever ever do.
If you wouldn’t run random Linux commands from an IRC chatroom, you shouldn’t run a random install script from the internet.