How do i download everything


(Reid Luna) #1

How do i download every module on the npm registry?


(Kat Marchán) #2

This is a great question! The easiest way is to use a private registry offering. There’s several of these, some enterprise-grade, some open source.

To do this for more scripty-like things, you can use a registry follower, which will stream the entire registry to you. Keep in mind that it’s a lot of data! On the order of terabytes, if you download the whole thing and all versions.


(Reid Luna) #3

thank you so much, i am sandboxing node projects, something like heroku. and since they will all be node projects, i figured why not keep them all local.


(Kat Marchán) #4

the main reason is that it’s an immense amount of data. A lot of private registries do a “pass-through cache” of sorts, where they only request files that their users are actually requesting.

You can also rely on the npm cache itself for something like this and just haul around ~/.npm and use package-lock.json for offline installs.