简体   繁体   中英

Installing Node packages globally without internet connection

I am working on Windows Server 2012 R2, but external internet connection is restricted in my Org. So i can not install any NPM packages on server directly.

I want to install pm2 OR forever packages globally so that all the user profiles(admin and users) can access that from any directory.

Please guide me in this case.

From another pc with internet connection, you can download the source code from github. For example, for pm2 it is : https://github.com/Unitech/pm2

After downloading the source code, you need to look into the package.json file and download all the dependency source code too. ( One easy way to do all of above is to use npm to fetch pm2 in a local directory then copy the pm2 along with all dependencies to a USB)

Transfer files into a directory of your server workstation using USB or any other suitable means.

Add the pm2/bin directory to your PATH.

Test with pm2 -v from command line to ensure PATH addition is correct.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM