Install PM2 Offline

Posted on

hello, I'm installing pm2 on redhat 7 offline, and I found an error like below, is there someone who can give me a solution to this error. thanks

[root@redhat pm2-installer-master]# npm run setup

pm2-installer@2.0.5 setup /root/pm2-installer-master/pm2-installer-master
node ./src/script-for-os.js

pm2-installer@2.0.5 setup:unix /root/pm2-installer-master/pm2-installer-master
bash ./src/unix/setup.sh

=== Setup ===
Running on: 3/25/2020, pm2-installer 2.0.5 with node v12.16.1 and npm 6.13.4 on linux-3.10.0-1062.18.1.el7.x86_64.
* Installing pm2
Bundled on: 3/25/2020, pm2-installer 2.0.5 with node v12.16.1 and npm 6.13.4 on linux-3.10.0-1062.18.1.el7.x86_64.
√ Offline install bundle appears valid.
Cache detected, installing offline..
Cache verified and compressed (~/pm2-installer-master/pm2-installer-master/.npm_cache/_cacache):
Content verified: 0 (0 bytes)
Index entries: 0
Finished in 0.012s
npm ERR! code ENOTCACHED
npm ERR! request to http://registry.npmjs.org/pm2 failed: cache mode is 'only-if-cached' but no cached response available.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/pm2-installer-master/pm2-installer-master/.npm_cache/_logs/2020-03-25T05_47_04_472Z-debug.log
npm ERR! code ENOTCACHED
npm ERR! request to http://registry.npmjs.org/pm2-logrotate failed: cache mode is 'only-if-cached' but no cached response available.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/pm2-installer-master/pm2-installer-master/.npm_cache/_logs/2020-03-25T05_47_04_815Z-debug.log
./src/unix/setup.sh: line 32: pm2: command not found
./src/unix/setup.sh: line 35: cd: /usr/lib/node_modules/pm2-logrotate/: No such file or directory
./src/unix/setup.sh: line 36: pm2: command not found
./src/unix/setup.sh: line 37: pm2: command not found
=== Setup Complete ===