According to npm docs, this should work;
npm install ./package.tgz
So I try this globally for pm2 tarfile I have downloaded from pm2 github repo releases page;
npm install -g ./pm2-3.2.2.tar.gz
But I got this;
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/@pm2%2fagent failed, reason: getaddrinfo ENOTFOUND nb nb:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-29T08_16_17_112Z-debug.log
-
npm version: 5.6.0
node version: 9.4.0
Is it a bug?
Is there any other way to install pm2 (and any other) package offline?