3 ms·
Commit your node_modules to source control. I've saved myself repeatedly by not putting node_modules in the project's gitignore. - All developers on a project
by gonyea 11y ago
Commit your node_modules to source control. I've saved myself repeatedly by not putting node_modules in the project's gitignore.
- All developers on a project are in sync.
- You can get the repo back into a good state if npm choked.
- You can go back in time to a prior version with all of it's actual dependencies at that point in time.
- borplk 11y agoI'd suggest people bake in an archival process during their deploys so you always have a zip/tarball of the entire source code and node_modules that you deploy, but still use npm install during development.