DEV Community

Discussion on: Configurable Artifacts: How To Deploy Like a Pro

Collapse
 
jng profile image
Julie Ng

As you can see, the deployment is actually very fast, because I don't need to build in the target environment.

What about the node_modules folder? That is a gap in your argument. Your "artifact" isn't guaranteed to work 100% of the time because of potential system bindings (30% of modules have system bindings).

Even if you don't need to build in the target environment, you will probably want to run npm install once in the environment to make sure all the dependencies are OK before continuing.

Collapse
 
kmaschta profile image
Kmaschta

This point is adressed in the tips just under the sentence you quoted:

Tips: That means that if the build contains binaries, they must be compiled for the target environment. To simplify, it means you should develop your code on the same system as you run it. It's simpler that it sounds once you use Vagrant or Docker.