npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm ERR! cb() never called! macOS

I get this error after attempting to install truffle:

I used v 4.1.4 without error and it stopped working. So I had trouble uninstalling it and had to manually delete the files successfully uninstalling it this way

However, beta version of truffle would not install either returning a permission error, while I am logged in as admin and root user enabled

So I deleted node and npm directories in attempt to reinstall all packages, updated homebrew, installed node again

Successful: node version installed: 8.12.0
npm version installed: 6.7.0

I then attempt to install truffle using force and this error is returned:

Nadines-iMac:~ NadineRoot$ npm install -f truffle

npm WARN using --force I sure hope you know what you are doing.

npm WARN registry Unexpected warning for Miscellaneous Warning ECONNRESET: request to failed, reason: read ECONNRESET

npm WARN registry Using stale data from due to a request error during revalidation.

Unhandled rejection Error: EACCES: permission denied, rename ‘/Users/NadineRoot/.npm/_cacache/tmp/996befda’ -> ‘/Users/NadineRoot/.npm/_cacache/content-v2/sha1/64/1a/a55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5’

Unhandled rejection Error: EACCES: permission denied, rename ‘/Users/NadineRoot/.npm/_cacache/tmp/01690107’ -> ‘/Users/NadineRoot/.npm/_cacache/content-v2/sha512/99/d2/c70e5f56798acdf8520a70c73d3e53df9c0f431bdbabe50a420ca72fe950b8448340b1317810cb9731930aa104ef661b4bc892151ff059f8a53cdf467c5e’

npm ERR! cb() never called!

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.

Thank you, this helped!