I need to install a nodejs module on a server and it does not have internet access. if down it in github, how to install it on the server?
I do not want to use npm install to download directly from the internet
I need to install a nodejs module on a server and it does not have internet access. if down it in github, how to install it on the server?
I do not want to use npm install to download directly from the internet
In the folder you downloaded Node.js run:
./configure --prefix=/opt/node && make && sudo make install
To make the node commands easier, add the node path to one of these files:
~/.profile
or ~/.bash_profile
or ~/.bashrc
or ~/.zshenv
Look for one of them edit with sudo nano
or sudo vim
and add the line:
export PATH=$PATH:/opt/node/bin
Source: link