How to install pm2-logrotate

513 Views Asked by At

I am trying to install pm2-logrotate,

sudo pm2 install pm2-logrotate

I am getting

[PM2][Module] Installing NPM pm2-logrotate module
[PM2][Module] Calling [NPM] to install pm2-logrotate ...
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/pm2-logrotate failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/moveoadm/.npm/_logs/2022-09-11T12_58_10_842Z-debug.log
[PM2][ERROR] Installation failed via NPM, module has been restored to prev version
1

There are 1 best solutions below

0
Artem Dudkin On

Looks like npm cannot resolve registry.npmjs.org, i.e. it not connected to Internet.

There are a lot of reasons, for instance, docker configuration - look at What's the cause of the error 'getaddrinfo EAI_AGAIN'?