Tuesday, 2 May 2017

Can the "node_modules" directory copy to each machine running a NodeJS app?

Two Linux machines. Both Linux CentOS x64, but are different versions.

Say I run npm install on machine #1, copy my entire application including the node_modules directory to machine #2 and run it there. Is that supported? Or, it is always advised to run npm install on each machine?

I was successful doing npm install on a Centos 6 x64 machine, copying the app including node_modules to a Centos 7 x64 machine. The application seemed to run fine. Even though it worked for me, is this generally safe to do so?



via Crash Override

No comments:

Post a Comment