I have a project which I will have to deploy to client Windows systems where it will not be possible to connect to internet. I currently have a folder in D:\\NODE which cont
1 - In system with internet access install module with this command:
npm install [module name]
2 - go to %userprofile%\AppData\Roaming\npm\node_modules[module name]\
(e.g C:\Users\janson\AppData\Roaming\npm\node_modules\grunt-cli)
3 - run npm pack
4 - this should result in a [module name]-x.y.z.tgz file
5 - run npm i -g [module name]-x.y.z.tgz
in offline system
You can install packages on a system without internet connection by packing them using built-in functionality in npm. This way, the node modules will be installed properly.
bundledDependencies
(docs on npm).npm install
to install your node files before packing. npm pack
.npm install <filename>
.Update
Regarding your comments, it looks like your globally installed node modules isn't found.
Try using the npm link
command (docs on npm link):
cd yourAppFolder
npm link node-windows