简体   繁体   中英

How to download the whole NPM repository for full offline development joy?

Recently I was on holiday with limited internet connectivity. I was developing an application in node.js when I suddenly needed some NPM packages. This put a severe halt in the development and I was forced to wait until I could go online to download said packages and continue development.

Is it possible to mirror the whole npm registry locally on my computer? How to do that?

It should be possible seeing as online mirrors of the main registry exists. Where do they gather all packages from?

This is what npm-offline could do for you. npm-offline could cache modules, you would just need to create a script that ensures you have the modules that you want cached.

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