Alby87
Alby87

Reputation: 321

Best way to archive or backup node_modules folder in Node.js/NPM

I'm in need to archive all the dependencies of a NodeJS project that uses NPM. My need is quite peculiar, as we should be able to return to a know state if necessary, not depending at all to internet repositories (offline). We tried to set up a private registry, but some finalizer scripts still needs connection to GitHub and similia to download files. At now we archive the"Node_Modules" folder, is it correct or it may create some troubles with other PCs or configurations?

Thank you

Upvotes: 5

Views: 2013

Answers (1)

Alby87
Alby87

Reputation: 321

I come up with a solution. Because this is an industrial grade application, I simply compressed and backuped the node_modules. I tried in a fresh VM without any network connection with new installation of Windows 10 and development tools (all offline packages). My two cents are: if you need to backup node_modules for developing support in some years, backup OS and Tools offline installers and zipped node_modules should do. Hope this helps someone.

Upvotes: 4

Related Questions