[crash] npm ERR! cb() never called!

cli
triaged
priority:medium

(Karl And) #84

Just got this problem as well.
npm version 6.7.0
node version v8.9.1
Been trying to fix this with ‘tips’ in this thread (way to long btw, someone from npm should look into this issue) but nothing does it.
If I run for example: sudo npm outdated -g
I first get a lot of 'Unhandled rejection Error: EISDIR: illegal operation on a directory'
And at the end it says:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community

So this is me reporting it in the nåm community. Or is there any other way to report errors like this…?


(John Gee) #85

Thanks for report. Concise reply, because this thread is too long. :slight_smile:

This topic was about “ERR! cb() never called!” with no other failure messages. You have another error (EISDIR), so not actually same issue.

There are multiple open topics about EISIDR with canonical topic. You are first to report issue with npm outdated so I think interesting! I suggest add details there. (Spoiler: likely workaround is changing ownership, avoiding sudo.)

For new replies here with original symptoms despite using npm 6.6 or higher, please note:


(Matteo Collina) #86

The latest releases fixed it for me. Very good job! May I ask what was the problem?


(Karl And) #87

Downloaded the lastest copy of Node from https://nodejs.org and installed it. That seems to fix the problem for me.


(Kat Marchán) #88

Node streams. Again. :weary:


(Matteo Collina) #89

I would love to get rid of them, which is impossible :cold_sweat:. I hope async iteration fixes most of the use cases in the future!


(Codehunter13) #91

I still have this error with: npm/6.7.0 node/v10.14.0 win32 x64":

019-02-07T08:46:13.5653099Z 19142 silly extract rxjs@6.3.3 extracted to D:\a\1\s\Pleegzorg\Pleegzorg.Web\ClientApp\node_modules.staging\rxjs-2c6f881a (31066ms)

2019-02-07T08:46:13.5653150Z 19143 silly extract rxjs@6.3.3 extracted to D:\a\1\s\Pleegzorg\Pleegzorg.Web\ClientApp\node_modules.staging\rxjs-dff26e5b (30988ms)

2019-02-07T08:46:13.5653201Z 19144 silly extract rxjs@6.4.0 extracted to D:\a\1\s\Pleegzorg\Pleegzorg.Web\ClientApp\node_modules.staging\rxjs-df39a7cc (31661ms)

2019-02-07T08:46:13.5653251Z 19145 timing npm Completed in 48242ms

2019-02-07T08:46:13.5653301Z 19146 error cb() never called!

2019-02-07T08:46:13.5653348Z 19147 error This is an error with npm itself. Please report this error at:

2019-02-07T08:46:13.5653399Z 19148 error <https://npm.community>

2019-02-07T08:46:13.5653429Z

2019-02-07T08:46:13.5709871Z ##[error]Error: Npm failed with return code: 1

2019-02-07T08:46:13.5735086Z ##[section]Finishing: npm install

npmError.log (1003,4 KB)


(Tom Clayson) #92

I am still seeing this issue intermittently, but consistently when I run npm dedupe && npm prune && npm install (in a desperate attempt to get jest to work in create-react-app).

Log is attached.

2019-02-08T11_13_31_809Z-debug.log (242.8 KB)


(Alexander Potts) #93

Had this error when attempting to upgrade node, ran command sudo npm install -g n directly after having cleaned the cache ( via running sudo npm cache clean -f)

It appears that it’s a directory access error: Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/Xander/.npm/_cacache/tmp' The directory exists, so I’m not sure why it cannot access the directory

Here’s the error log
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 ‘n’ ]
2 info using npm@6.7.0
3 info using node@v8.9.4
4 verbose npm-session ab30e72da09b5213
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing npm Completed in 744ms
8 error cb() never called!
9 error This is an error with npm itself. Please report this error at:
10 error <https://npm.community>


(John Gee) #94

@jakkso I wrote up detailed instructions to hopefully resolve your situation here: Error: while installing http-server on MacOS Mojave 10.14.2

The canonical topic for current EISDIR problems is: Global installs (sudo npm i -g) fail on Mac after 6.5 upgrade. Works fine after 6.4.1 downgrade.


(Wang Dàpéng) #95

Still getting this error with npm ci, debug log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'ci' ]
2 info using npm@6.7.0
3 info using node@v10.12.0
4 verbose npm-session ad376f23729f63a3
5 info prepare initializing installer
6 verbose prepare starting workers
7 verbose prepare installation prefix: ***
8 verbose prepare using package-lock.json
9 verbose checkLock verifying package-lock data
10 silly tree LogicalTree {
...
6311 silly extractTree kind-of@3.2.2 -> ***
6312 timing npm Completed in 13780ms
6313 error cb() never called!
6314 error This is an error with npm itself. Please report this error at:
6315 error <https://npm.community>

cb() never called error