4 ms·
Committing your `node_modules` is a bad idea. The best answer is to either use an offline cache of package tarballs that have been committed to your repo, or a
by acemarke 9y ago
Committing your `node_modules` is a bad idea. The best answer is to either use an offline cache of package tarballs that have been committed to your repo, or an NPM caching proxy.
Yarn has an "offline mirror" feature built in, and Shrinkpack is a tool that can create an offline mirror based on an npm-shrinkwrap.json file.
I wrote about using Yarn's offline mirror here: http://blog.isquaredsoftware.com/2017/07/practical-redux-part-9-managing-dependencies/#managing-dependency-packages-for-offline-installation http://blog.isquaredsoftware.com/2017/07/practical-redux-par...
- djsumdog 9y agoI know you can use JFrog/Artifactory to cache pulls of Jar files from maven repos, as well as Docker images. Does JFrog support node?
- acemarke 9y agoI haven't actually used an NPM caching proxy myself. It looks like Artifactory does support acting as an NPM proxy. The other tools I've heard of are Sinopia, Verdaccio, and local-npm. Addy Osmani has a related article at https://addyosmani.com/blog/using-npm-offline/ https://addyosmani.com/blog/using-npm-offline/ .
- Qerub 9y agoYes, JFrog Artifactory supports npm and so does Sonatype Nexus. More info: https://www.jfrog.com/confluence/display/RTF/Npm+Registry https://www.jfrog.com/confluence/display/RTF/Npm+Registry https://help.sonatype.com/display/NXRM3/Node+Packaged+Modules+and+npm+Registries https://help.sonatype.com/display/NXRM3/Node+Packaged+Module...
- vePhi4le 9y agoyes: https://www.jfrog.com/confluence/display/RTF/Npm+Registry https://www.jfrog.com/confluence/display/RTF/Npm+Registry