bug "with npm itself"

What I Wanted to Do

npm install -g npm
in order to update

npm install -g npm

What Happened Instead

Unhandled rejection Error: EACCES: permission denied, mkdir ‘/Users/averychan/.npm/_cacache/index-v5/af/03’

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:

Reproduction Steps

npm install -g npm

Details

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

Platform Info2019-10-15T01_58_25_693Z-debug.log (508 Bytes)

$ npm --versions
<!-- paste output here -->
$ node -p process.platform
<!-- paste output here -->

You might have a problem with file ownership being broken by past uses of sudo with global installs. This was fixed in: Release: 6.10.2

The quick fix is:


sudo chown -R $USER ~/.npm

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