I need to install a "global" npm applications on an offline server.
It is easy to install a normal application:
npm install
and then pack up the resulting files. Either manually or using npm pack.
However, how can I install global application (that has a install script of some sort) such as forever without Internet?
npm install -g forever
You can install stuff from a tarball file, check out the npm documentation. You can find the URL of the forever tarball with
npm view forever dist.tarball
and download that. Try something like this:But you might have to do this for all of the dependencies as well. There might be a better way but this is what I've found in my search.
Try npmzip
You will get the tarball in the current directory This may be moved to the target machine and :