npm Community Forum (Archive)

The npm community forum has been discontinued.

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

[SOLVED] npm ERR! cb() never called! - React Native Mac Os X

I found the solution, it was to update the version of nodejs to the last 10.16 [the most recommended]

Hello, I have this problem when using React Native

Unhandled rejection Error: EISDIR: illegal operation on a directory, open ‘/Users/user/.npm/_cacache/content-v2/sha512/c7/06’

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘install’,
1 verbose cli ‘-g’,
1 verbose cli ‘npm@latest’ ]
2 info using npm@6.9.0
3 info using node@v9.3.0
4 verbose npm-session 98713c67d0d8c1fd
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing npm Completed in 1482ms
8 error cb() never called!
9 error This is an error with npm itself. Please report this error at:
10 error

node v9.3.0 - npm v6.9.0

This specific bug is triggered by a buggy version of lchown for MacOS that has slumbered in the node.js codebase for many years, but started biting people when running npm under sudo when a supplementary package (chownr) was updated last year.

It is fixed in node 10.6 and later.