Unhandled rejection Error: EACCES: permission denied

npm install staticmaps
Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/52/f7/13ab8ff096ebdfcc168c1f3c5df350c925fe641316ca0aff1289732608f5’

Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/00/be/889653542d6ce4003bf393f1270d643388e29b160f12408fddf72b3bfc82’

Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/96/d3/b1b0d11bc108d09ecd8f7eb4cc997110173243c148b1d5299a5c855b08f1’

Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/a7/ef/31e6ffa8a59312ca1b1c642d399b75a1ea631b03465f9f4ebdf2edbfb0b5’

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 ERR! A complete log of this run can be found in:
npm ERR! /home/anandhu/.npm/_logs/2019-03-12T05_03_41_782Z-debug.log
anandhu@Elsys-6:~/Desktop/Study/test_app$ npm install staticmaps --save
Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/96/d3/b1b0d11bc108d09ecd8f7eb4cc997110173243c148b1d5299a5c855b08f1’

Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/a7/ef/31e6ffa8a59312ca1b1c642d399b75a1ea631b03465f9f4ebdf2edbfb0b5’

Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/00/be/889653542d6ce4003bf393f1270d643388e29b160f12408fddf72b3bfc82’

Unhandled rejection Error: EACCES: permission denied, open ‘/home/anandhu/.npm/_cacache/index-v5/52/f7/13ab8ff096ebdfcc168c1f3c5df350c925fe641316ca0aff1289732608f5’

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 ERR! A complete log of this run can be found in:
npm ERR! /home/anandhu/.npm/_logs/2019-03-12T05_04_25_050Z-debug.log

1 Like

Thanks. There is an open issue with installing global packages using sudo leaving behind files with the wrong ownership.

The short version is run this to fix the ownership, then try your install again:

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.

1 Like

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