Reputation: 85
I need to be able to install the carto module on an offline server. Is there a way that I could package up carto with all of its dependencies, and install it on a server that has no connection to the internet. The server won't have an initial connection, and will have npm and node installed from a .deb archive.
I've tried using npm-offline, as well as npm-offline-packer. These both require that I have an npm registry or a node project.
I'm hoping to have a start script that can run the required commands and get all packages installed. So far, I'm able to install all ubuntu software, just stuck on node.
Upvotes: 1
Views: 3034
Reputation: 9892
An alternative would be installing it in another machine and copying the package(s) you want inside npm's global node_modules
.
npm config get prefix
Gets the path to where it is installed. node_modules
are usually under lib/
folder. Module executables could be located under bin/
. Having both should be enough to use your global module in another machine.
Since you're looking for a start script the steps you need are:
npm config get prefix
bin/
i.e. carto@
lib/node_modules
i.e. lib/node_modules/carto
Upvotes: 3