Reputation: 91
My Ubuntu server is behind firewall.hence when ever I try to run command to install sails via putty using command npm install sails -g ,I get error Error: connect ECONNREFUSED. There fore I though if I can download the sails package on to my local and then moving the package manually on firewall server and installing it. I tried looking for some help on web but could not get. Please guide how to proceed
Upvotes: 1
Views: 311
Reputation: 7736
If your computer is not connected to the internet npm will not work.
If you have another computer connected to the internet, you can run the npm commands there and afterwards copy the contents to the other computer. (e.g. via USB stick)
In most cases you should have no problems, even on different operating systems.
Note on global modules: For global modules (e.g. gulp, bower, forever) you will not be able to install into node_modules using this technique. However, you can install them locally by saving them to your package json and running them from their local path.
e.g.
npm install --save forever
./node_modules/forever/bin/forever
Check the files system for the exact path.
Upvotes: 3