Setup:
A VM with an Internet connection where
npm install
will be executed to install all the app dependencies. The result will be a folder with the app and its dependencies innode_modules
.Between the app modules is fi:
mongoose
, which on installation time usesnode-gyp
to compile a native BSON extension.The app folder is copied to another VM without an Internet conection and it is fully functional, but then the compiled extensions don't work but its
.js
fallbacks does.
Question:
How can I reinstall/recompile/regenerate all the app modules on the new VM without an Internet conection?