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.
1 Answer 1
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:
- Getting npm prefix via
npm config get prefix - Go to that path
- Copy executables you want under
bin/i.e.carto@ - Copy content you want from
lib/node_modulesi.e.lib/node_modules/carto - Apply to the machine you want using the same steps described here