Open benrolfe opened 7 years ago
Any help @Anahkiasen?
In Rocketeer 2 there is no special mechanism in place for this (there is in Rocketeer 3 but it is not out yet). You however have several solutions at hand:
node_modules
in your shared
folders so that it is reused between releases. This however makes rollbacks more difficult so it is to keep in mindnode_modules
from the previous release in a before hook, if it existsFinally before doing this you can solve the issue at the package manager level – ie. look into why it is taking several minutes in the first place. Maybe give a shot at either Yarn or NPM5 which both provide faster installation times for Node dependencies. There are also some wrappers around NPM like npm-cache and stuff, older versions of NPM were notably slow so you should find things pretty easily on the web
I'd recommend to do this first because even if you can make it fast for deployments you're really just working around the problem and it will still be slow for you locally and for every first deployment on a new server, and so on.
Is there a way to cache the
node_modules
folder? It's taking several minutes to install all the node packages on each deploy.