PM2 unhandled rejection error (npm i pm2 -g)

What I Wanted to Do

Installing PM2 with npm i pm2 -g

What Happened Instead

Got this unhandled rejection error=
Unhandled rejection Error: EACCES: permission denied
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

Reproduction Steps

Just go on your terminal and paste= npm install pm2 -g
you’ll get the error probably

Details

this is my first report so idk :)

Platform Info

npm --versions { proyecto_jira_4: '1.0.0', npm: '6.9.0', ares: '1.15.0', brotli: '1.0.7', cldr: '35.1', http_parser: '2.8.0', icu: '64.2', llhttp: '1.1.3', modules: '72', napi: '4', nghttp2: '1.38.0', node: '12.4.0', openssl: '1.1.1b', tz: '2019a', unicode: '12.1', uv: '1.29.1', v8: '7.4.288.27-node.18', zlib: '1.2.11' } node -p process.platform
linux

Do you need to use “sudo”?
Can you attach the log file?

1 Like

yes, it did work with sudo, thank you for the solution, i’m still new to node.

1 Like