Hi, I'd like to install a pm2 module (in this case pm2-logrotate) without a network connection. Is this possible? I can probably install the pm2 module to .pm2/node_modules using npmbox, but how can I get pm2 to active the module?
Hello,
Good question, this needs to be documented in the future,
PM2 auto start all modules present in .pm2/node_modules, a good practice would be to directly tar the .pm2 folder and untar it in your offline server.
_Note: pm2 export = generate .tar.gz with modules, configuration, dump file etc_
Possible starting PM2 2.X
$ pm2 install my-packed-module.tgz
I tried that with no luck. How exactly the packed module should be packed? Still no mention in documentation.
You can use something like npm-bundle pm2-logrotate
Even with this offline installation it still requires git.
Any idea?
You have to use the absolute path to the module like this:
pm2 install /home/user/pm2-logrotate-2.7.0.tgz