cb() never called! error

I tried “npm install” in my project folder and its throwing me error as “Unhandled rejection Error: EACCES: permission denied, mkdir ‘/home/swathi/.npm/_cacache/tmp’”

Please let me know what to be done…Here is the complete error:
Unhandled rejection Error: EACCES: permission denied, mkdir ‘/home/swathi/.npm/_cacache/tmp’
npm ERR! cb() never called!

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

npm --versions 6.8.0 node -p process.platform
Linux

The “cb() never called!” is not the underlying error, it is usually a symptom of something else going wrong, in this case the EACCES: permission denied.

Do you use sudo when doing global installs?

The short version is try quick fix with:

sudo chown -R $(whoami) ~/.npm

The long version and canonical bug is: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.