npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.38k stars 3.11k forks source link

🐞 [BUG] "npm ERR! cb() never called!" or "Exit handler never called" #417

Closed darcyclarke closed 3 years ago

darcyclarke commented 4 years ago

*Updated* as of 01/15/2021

Note: Please read [this doc](https://github.com/npm/cli/wiki/%22cb()-never-called%3F-Exit-handler-never-called%3F-I'm-having-the-same-problem!%22) before filing a new issue.

DanielRuf commented 4 years ago

I think we have many reports of the same so these should all be duplicates.

https://github.com/npm/cli/issues/423 https://github.com/npm/cli/issues/425 https://github.com/npm/cli/issues/442 https://github.com/npm/cli/issues/451 https://github.com/npm/cli/issues/455 https://github.com/npm/cli/issues/465

Afaik this is resolved by force-clearing the cache and upgrading / updating to the latest npm version.

DanielRuf commented 4 years ago

https://github.com/npm/cli/issues/303 https://github.com/npm/cli/issues/306 https://github.com/npm/cli/issues/325 https://github.com/npm/cli/issues/353 https://github.com/npm/cli/issues/369 https://github.com/npm/cli/issues/370 https://github.com/npm/cli/issues/375 https://github.com/npm/cli/issues/383 https://github.com/npm/cli/issues/408 https://github.com/npm/cli/issues/418 https://github.com/npm/cli/issues/448 https://github.com/npm/cli/issues/474 https://github.com/npm/cli/issues/499 https://github.com/npm/cli/issues/522

ruyadorno commented 4 years ago

thanks @DanielRuf for linking all those ❤️

ruyadorno commented 4 years ago

489

DanielRuf commented 4 years ago

https://github.com/npm/cli/issues/544 https://github.com/npm/cli/issues/552 https://github.com/npm/cli/issues/553 https://github.com/npm/cli/issues/556 https://github.com/npm/cli/issues/566 https://github.com/npm/cli/issues/570 https://github.com/npm/cli/issues/571 https://github.com/npm/cli/issues/573 https://github.com/npm/cli/issues/574 https://github.com/npm/cli/issues/581 https://github.com/npm/cli/issues/584 https://github.com/npm/cli/issues/585 https://github.com/npm/cli/issues/594 https://github.com/npm/cli/issues/596 https://github.com/npm/cli/issues/618 https://github.com/npm/cli/issues/630 https://github.com/npm/cli/issues/634

DanielRuf commented 4 years ago

I guess we can check which version first introduced this (doing a small git bisect) and check the stacktraces for similarities.

DanielRuf commented 4 years ago

Following versions were mentioned in the issues:

6.4.1 6.9.0 6.10.2 6.12.1 6.13.1 6.13.4

Now trying to get a reproducible testcase.

DanielRuf commented 4 years ago

Relevant changes in the past tolog this error: https://github.com/npm/npm/pull/15716

DanielRuf commented 4 years ago

Tests with a local npm 6.13.1 (on macOS):

@vue/cli: not reproducible npm audit fix: not reproducible plotly.js: not reproducible expo-cli: not reproducible

So far it looks like this is caused by other errors which cancel the CLI too early.

I remember that we had this bug also on Ubuntu with the latest version and some packages.

melvinwallerjr commented 4 years ago

I'm experiencing the same error trying to install a company project for development. Microsoft Windows [Version 10.0.17134.1184]

Using NVM to switch instances of node/npm node v10.14.2 (64-bit), npm v6.4.1 node v12.4.0 (64-bit), npm v6.9.0

project was generated with Angular CLI version 8.3.21

[NVM for Windows Setup, Ecor Ventures LLC, ‎Tuesday, ‎August ‎7, ‎2018 9:46:31 PM]

ljharb commented 4 years ago

(note that must be nvm-windows; actual nvm doesn't work on non-WSL Windows, and doesn't distinguish 64-bit)

mdouglass commented 4 years ago

We're getting this error intermittently in both local development and in our CI system. Happy to add any additional logging that might help. Attached the npm log from a run that just happened on my laptop on my mac -- trying to npm install one of our private packages. Immediately re-running the command worked without issue.

npm install @globalworldwide/km-core@latest 2020-01-04T02_02_56_202Z-debug.log

❯ npm -v 6.13.4 ❯ node -v v13.5.0

Let me know if there's anything I can do to help track this down, would like to kill the issue.

DanielRuf commented 4 years ago

https://github.com/npm/cli/issues/682

DanielRuf commented 4 years ago

https://github.com/npm/cli/issues/671

DanielRuf commented 4 years ago

https://github.com/npm/cli/issues/665

mikemimik commented 4 years ago

Actions Triggered:

Thoughts as triaging:

puppy0cam commented 4 years ago

It's shocking how few people know how to use a search bar...

jslegers commented 4 years ago

Does anyone have ANY idea what might be causing this?

Are there any workarounds?

When I run my npm install locally, on windows 10, everything works fine.

When I run my npm install on dev.azure.com, on a 64bit Amazon Linux/4.13.0 machine, I get the following error :

120982 error cb() never called!
120983 error This is an error with npm itself. Please report this error at:
120984 error <https://npm.community>

I tried upgrading my Node environment from Node 10 to Node 12, as I was also running Node 12 locally, but this did not seem to have any impact whatsoever.

I have no idea what to do with this, and this issue is totally blocking!!

mikemimik commented 4 years ago

Hey @jslegers sorry to hear you're blocked!

In my initial research into the issue, I noted that the issue https://github.com/npm/cli/issues/442 referenced our community page which had a link to a possible solution for you. Clearing the cache seemed to solve the issue for some. I would suggest giving that a try to see if you can unblock your work.

jslegers commented 4 years ago

Hey @jslegers sorry to hear you're blocked!

In my initial research into the issue, I noted that the issue #442 referenced our community page which had a link to a possible solution for you. Clearing the cache seemed to solve the issue for some. I would suggest giving that a try to see if you can unblock your work.

Thanks for the tip!

I did eventually manage to find a solution on my own.

Apparently, the issue was caused by my making some changes to the local package structure. As part of an ongoing refactoring attempt, I got rid of a one-size-fits-all kind of unscoped package and replaced it with a bunch of small scoped packages. Apparently, this confused NPM and caused the npm ERR! cb() never called! bug.

In seems to have been fixed by deleting my package-lock.json file and pushing that deletion to the remote branch where this issue occurred.

jrtitus commented 4 years ago

For me, this occurred when I was attempting to npm install over a corporate proxy, through a VPN (actually, the proxy doesn't seem to matter). NPM chokes when a package attempts to download a binary (for example, https://github.com/sass/node-sass/releases/download/v4.13.1/win32-x64-79_binding.node, in my case) during the postinstall step (no idea if it's package dependent).

After turning off the VPN (Global Protect) and the proxy - everything worked without a hitch.

With Proxy and VPN turned ON ❌

$ npm i node-sass
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!     C:\Users\---\AppData\Roaming\npm-cache\_logs\2020-03-16T23_37_35_801Z-debug.log

image

image

image

2020-03-16T23_37_35_801Z-debug.log

With Proxy & VPN turned OFF ✔

$ npm i node-sass
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> node-sass@4.13.1 install C:\Users\---\Desktop\foo\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/win32-x64-79_binding.node
Download complete
Binary saved to C:\Users\---\Desktop\foo\node_modules\node-sass\vendor\win32-x64-79\binding.node
Caching binary to C:\Users\---\AppData\Roaming\npm-cache\node-sass\4.13.1\win32-x64-79_binding.node

> node-sass@4.13.1 postinstall C:\Users\---\Desktop\foo\node_modules\node-sass
> node scripts/build.js

Binary found at C:\Users\---\Desktop\foo\node_modules\node-sass\vendor\win32-x64-79\binding.node
Testing binary
Binary is fine
npm WARN foo@1.0.0 No description
npm WARN foo@1.0.0 No repository field.

+ node-sass@4.13.1
added 173 packages from 137 contributors and audited 528 packages in 16.034s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

image

With Proxy Only ✔

$ npm i node-sass
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> node-sass@4.13.1 install C:\Users\---\Desktop\foo\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/win32-x64-79_binding.node
Download complete
Binary saved to C:\Users\---\Desktop\foo\node_modules\node-sass\vendor\win32-x64-79\binding.node
Caching binary to C:\Users\---\AppData\Roaming\npm-cache\node-sass\4.13.1\win32-x64-79_binding.node

> node-sass@4.13.1 postinstall C:\Users\---\Desktop\foo\node_modules\node-sass
> node scripts/build.js

Binary found at C:\Users\---\Desktop\foo\node_modules\node-sass\vendor\win32-x64-79\binding.node
Testing binary
Binary is fine
npm WARN foo@1.0.0 No description
npm WARN foo@1.0.0 No repository field.

+ node-sass@4.13.1
added 173 packages from 137 contributors and audited 528 packages in 16.233s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

image

So, by deductive reasoning, it must have something to do with how the request/response is being handled over the VPN...

I made sure to rm /c/Users/---/AppData/Roaming/npm-cache/node-sass/4.13.1/win32-x64-79_binding.node and start with a new node_modules directory between each test.

I'm generally working from the office, so I only need to deal with the proxy, which doesn't cause an issue. However, now that we're all working from home, I had the chance to run into this... Hopefully it helps, somehow 😅

Version and System Information

DanielRuf commented 4 years ago

darcyclarke closed this vor 1 Stunde

@darcyclarke is this issue resolved by some commit?

darcyclarke commented 4 years ago

@DanielRuf apologies. This got caught up in a triage of issues in ZenHub (our project management system). I've reopened accordingly.

gbkwiatt commented 4 years ago

Had same issue, trying to install blank expo init project. Node 13.12.0, npm 6.14.5 For me seems, like adding my project folder to Windows Defender exclusions helped. Settings->Update and Security->Windows Security->Virus & threat protection -> Virus & threat protection settings -> Exclusions and I have added whole folder to it.

DanielRuf commented 4 years ago

Did this cause the issue? I think many do not have an antivirus or Windows 10. Happens also on Linux and macOS without any realtime antivirus scanner.

In general I disable antivirus while installing to get faster installs as it scans every single file on access / creation - with disabled scripts and a full scan afterwards it works then.

gbkwiatt commented 4 years ago

Bit sure, but I've tried multiple times with same error, then I did that and it helped. Might be also something to do with indexing no idea.

malisbad commented 4 years ago

While having the https-proxy value set in npm config set, but not being on the network that had the proxy, I was getting this error. If I deleted the proxy value, things worked again. It might be a good idea to include a suggestion that you check the proxy settings for npm if people are encountering this error.

npm version: 6.17.4 node version: 12.18.3 nvm version: 0.35.3

pkrasicki commented 4 years ago

Other related issues:

1696

1671

1740

1737

1731

1666

1647

1625

1608

1605

1552

1546

1531

1505

1466

1464

1720

1748

tmtron commented 3 years ago

We get this sometimes in Windows WSL2

buckleyGI commented 3 years ago

After doing more than 500 runs on our buildserver (Azure DevOps) we come to the the following conclusions.

One could draw the conclusion that the fault lies with Azure DevOps but reading other reports of this issue it seems that a race condition is involved. And 1 thing to not is that the "npm ci" command we are performing takes about 3 minutes when connecting to npm and 5 mins when connecting to DevOps.

Our setup:npm/6.14.8 node/v14.15.0 win32 x64 We tried also with the latest npm v7 which gives the same error. Looking at the logs it happens 100% of the time (when it fails 12% of the time) after ckeditor-4.12.1 is handled.

For the moment we switched to the npm registry but we expect to be throttled at some point which was to reason to start relying on Azure Artifacts.

This issue seems elusive and quit a few people are struggling with it. You can count on us to provide any addition information.

buckleyGI commented 3 years ago

@darcyclarke Is there a way I can send the full logs (so not only the error message) in private? Thank you.

fbeyl commented 3 years ago

2 info using npm@6.14.5 3 info using node@v12.18.1 4 verbose npm-session ae39a2f66d8c100b 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 http fetch GET 407 https://api.bintray.com/npm/ca/brightside/@brightside%2fcore 981ms 8 timing npm Completed in 4923ms 9 error cb() never called! 10 error This is an error with npm itself. Please report this error at: 11 error https://npm.community

JohnRDOrazio commented 3 years ago

I was just trying to setup the WordPress Gutenberg development environment, following the instructions here. When running npm ci after several hours of downloading packages I finally got this same error:

npm WARN prepare removing existing node_modules/ before installation
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!     ~/.npm/_logs/2021-02-09T15_03_04_051Z-debug.log

The last few lines of the log have:

20451 silly extractTree glob@7.1.6 -> /mnt/e/DEVELOPMENT/WordPressDev/gutenberg/node_modules/node-gyp/node_modules/rimraf/node_modules/glob
20452 silly tarball trying glob@7.1.6 by hash: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
20453 silly extract semver@5.3.0 extracted to /mnt/e/DEVELOPMENT/WordPressDev/gutenberg/node_modules/node-gyp/node_modules/semver (2897ms)
20454 silly extract nopt@3.0.6 extracted to /mnt/e/DEVELOPMENT/WordPressDev/gutenberg/node_modules/nopt (2898ms)
20455 silly extract glob@7.1.6 extracted to /mnt/e/DEVELOPMENT/WordPressDev/gutenberg/node_modules/node-gyp/node_modules/rimraf/node_modules/glob (2251ms)
20456 silly extract ramda@0.25.0 extracted to /mnt/e/DEVELOPMENT/WordPressDev/gutenberg/node_modules/ramda (69428ms)
20457 timing npm Completed in 15388889ms
20458 error cb() never called!
20459 error This is an error with npm itself. Please report this error at:
20460 error <https://npm.community>

NPM version: 6.14.10 Node version: v14.15.4 Ubuntu 20.04 WSL2


UPDATE: I tried building the WordPress Gutenberg plugin on a different machine with the same setup, but on a different network. The packages were installed quite a bit faster and I didn't get the cb() never called error this time. So I'm guessing it was some kind of network issue on the machine I used the first time round.

ChristianF88 commented 3 years ago

Hi there,

you can add NPM version 6.14.11 to the list. Node has version v15.8.0. Everything is install stalled on: Linux alarmpi 5.10.13-3-ARCH #1 SMP Fri Feb 5 21:01:37 UTC 2021 armv6l GNU/Linux

Here are the last few lines of the log file:

30759 silly extract caniuse-lite@1.0.30000885 extracted to /home/alarm/stackedit/node_modules>
30760 silly extract git+https://github.com/paulrosen/MIDI.js.git#abcjs extracted to /home/ala>
30761 http fetch GET 200 https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz 139130ms
30762 http fetch GET 200 https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000791.tgz >
30763 silly extract caniuse-db@1.0.30000791 extracted to /home/alarm/stackedit/node_modules/.>
30764 silly extract core-js@2.5.3 extracted to /home/alarm/stackedit/node_modules/.staging/co>
30765 http fetch GET 200 https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz 489770ms
30766 http fetch GET 200 https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.317.0.tgz 948245ms
30767 silly extract fsevents@1.1.3 extracted to /home/alarm/stackedit/node_modules/.staging/f>
30768 silly extract aws-sdk@2.317.0 extracted to /home/alarm/stackedit/node_modules/.staging/>
30769 timing npm Completed in 1277135ms
30770 error cb() never called!
30771 error This is an error with npm itself. Please report this error at:
30772 error <https://npm.community>

Thanks!

GeduardoOC commented 3 years ago

npm ERR! cb() never called!

npm ERR! This is an error with npm itself.

mikestratton commented 3 years ago

npm i -g npm@latest

Resolved it for me.
:-)

BeingShaashi commented 3 years ago

https://github.com/npm/cli/issues/417

BeingShaashi commented 3 years ago

The error still exists and will always I think because I see no one from NPM is actually trying to resolve it, other than telling workarounds and expecting it to work so that they can close the issue.

hrithikwins commented 3 years ago

0 verbose cli [ 0 verbose cli '/usr/bin/node', 0 verbose cli '/usr/local/bin/npm', 0 verbose cli 'i', 0 verbose cli 'bootstrap@5.0.0-alpha1' 0 verbose cli ] 1 info using npm@7.6.0 2 info using node@v14.16.0 3 timing config:load:defaults Completed in 2ms 4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 3ms 5 timing config:load:builtin Completed in 3ms 6 timing config:load:cli Completed in 3ms 7 timing config:load:env Completed in 0ms 8 timing config:load:file:/home/hrithik/workspace/react/heavenhill-2020/.npmrc Completed in 0ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:/home/hrithik/.npmrc Completed in 0ms 11 timing config:load:user Completed in 1ms 12 timing config:load:file:/etc/npmrc Completed in 0ms 13 timing config:load:global Completed in 0ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 1ms 16 timing config:load:setUserAgent Completed in 1ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 13ms 19 verbose npm-session 4e9a670f5ee81229 20 timing npm:load Completed in 26ms 21 timing arborist:ctor Completed in 1ms 22 timing idealTree:init Completed in 2035ms 23 timing idealTree:userRequests Completed in 4ms 24 silly idealTree buildDeps 25 silly fetch manifest bootstrap@5.0.0-alpha1 26 timing arborist:ctor Completed in 0ms 27 http fetch GET 304 https://registry.npmjs.org/bootstrap 5556ms (from cache) 28 silly fetch manifest popper.js@^1.16.0 29 http fetch GET 304 https://registry.npmjs.org/popper.js 1995ms (from cache) 30 silly placeDep ROOT bootstrap@5.0.0-alpha1 REPLACE for: heavenhillresort1@0.1.0 want: 5.0.0-alpha1 31 silly placeDep ROOT popper.js@1.16.1 REPLACE for: bootstrap@5.0.0-alpha1 want: ^1.16.0 32 timing idealTree:#root Completed in 7584ms 33 silly fetch manifest popper.js@1.16.1-lts 34 silly placeDep node_modules/@material-ui/core popper.js@1.16.1-lts OK for: @material-ui/core@4.11.0 want: 1.16.1-lts 35 timing idealTree:node_modules/@material-ui/core Completed in 3ms 36 timing idealTree:node_modules/bootstrap Completed in 0ms 37 timing idealTree:node_modules/popper.js Completed in 0ms 38 timing idealTree:node_modules/@material-ui/core/node_modules/popper.js Completed in 0ms 39 timing idealTree:buildDeps Completed in 7590ms 40 timing idealTree:fixDepFlags Completed in 56ms 41 timing idealTree Completed in 9732ms 42 timing reify:loadTrees Completed in 9733ms 43 timing reify:diffTrees Completed in 64ms 44 silly reify mark retired [ 44 silly reify '/home/hrithik/workspace/react/heavenhill-2020/node_modules/bootstrap' 44 silly reify ] 45 silly reify mark retired [ 45 silly reify '/home/hrithik/workspace/react/heavenhill-2020/node_modules/popper.js' 45 silly reify ] 46 silly reify moves { 46 silly reify '/home/hrithik/workspace/react/heavenhill-2020/node_modules/bootstrap': '/home/hrithik/workspace/react/heavenhill-2020/node_modules/.bootstrap-MMOovjIg', 46 silly reify '/home/hrithik/workspace/react/heavenhill-2020/node_modules/popper.js': '/home/hrithik/workspace/react/heavenhill-2020/node_modules/.popper.js-fA2ADyuS' 46 silly reify } 47 timing reify:retireShallow Completed in 8ms 48 timing reify:createSparse Completed in 222ms 49 timing reify:loadBundles Completed in 0ms 50 verbose reify failed optional dependency /home/hrithik/workspace/react/heavenhill-2020/node_modules/fsevents 51 silly reify mark deleted [ 51 silly reify '/home/hrithik/workspace/react/heavenhill-2020/node_modules/fsevents' 51 silly reify ] 52 timing reifyNode:node_modules/fsevents Completed in 6ms 53 silly tarball no local data for bootstrap@https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.0-alpha1.tgz. Extracting by manifest. 54 timing reifyNode:node_modules/@material-ui/core/node_modules/popper.js Completed in 512ms 55 warn deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 56 timing reifyNode:node_modules/popper.js Completed in 514ms 57 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 686ms 58 timing auditReport:getReport Completed in 694ms 59 timing auditReport:init Completed in 0ms 60 timing reify:audit Completed in 697ms 61 timing npm Completed in 428935ms 62 error cb() never called! 63 error This is an error with npm itself. Please report this error at: 64 error https://github.com/npm/cli/issues

ustas4 commented 3 years ago

11869 http fetch GET 200 https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz 449483ms 11870 timing reifyNode:node_modules/typescript Completed in 469850ms 11871 warn tar TAR_ENTRY_ERROR EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\recursive-readdir\test\testsymlinks\linkeddir\hi.docx' 11872 silly tar Error: EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\recursive-readdir\test\testsymlinks\linkeddir\hi.docx' 11872 silly tar TAR_ENTRY_ERROR EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\recursive-readdir\test\testsymlinks\linkeddir\hi.docx' [Error: EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\recursive-readdir\test\testsymlinks\linkeddir\hi.docx'] { 11872 silly tar errno: -4048, 11872 silly tar code: 'EPERM', 11872 silly tar syscall: 'open', 11872 silly tar path: 'C:\Users\stas.admin\Desktop\my-app\node_modules\recursive-readdir\test\testsymlinks\linkeddir\hi.docx', 11872 silly tar entry: ReadEntry { 11872 silly tar _events: [Object: null prototype] {}, 11872 silly tar _eventsCount: 0, 11872 silly tar _maxListeners: undefined, 11872 silly tar pipes: Yallist { tail: [Node], head: [Node], length: 1 }, 11872 silly tar buffer: Yallist { tail: null, head: null, length: 0 }, 11872 silly tar writable: false, 11872 silly tar readable: false, 11872 silly tar extended: null, 11872 silly tar globalExtended: null, 11872 silly tar header: Header { 11872 silly tar cksumValid: true, 11872 silly tar needPax: false, 11872 silly tar nullBlock: false, 11872 silly tar block: null, 11872 silly tar path: 'package/test/testsymlinks/linkeddir/hi.docx', 11872 silly tar mode: 420, 11872 silly tar uid: null, 11872 silly tar gid: null, 11872 silly tar size: 0, 11872 silly tar mtime: 2018-02-21T21:38:20.000Z, 11872 silly tar cksum: 7331, 11872 silly tar linkpath: '', 11872 silly tar uname: '', 11872 silly tar gname: '', 11872 silly tar devmaj: 0, 11872 silly tar devmin: 0, 11872 silly tar atime: null, 11872 silly tar ctime: null, 11872 silly tar [Symbol(type)]: '0' 11872 silly tar }, 11872 silly tar startBlockSize: 0, 11872 silly tar blockRemain: 0, 11872 silly tar remain: 0, 11872 silly tar type: 'File', 11872 silly tar meta: false, 11872 silly tar ignore: false, 11872 silly tar path: 'test/testsymlinks/linkeddir/hi.docx', 11872 silly tar mode: 438, 11872 silly tar uid: null, 11872 silly tar gid: null, 11872 silly tar uname: '', 11872 silly tar gname: '', 11872 silly tar size: 0, 11872 silly tar mtime: 2018-02-21T21:38:20.000Z, 11872 silly tar atime: null, 11872 silly tar ctime: null, 11872 silly tar linkpath: '', 11872 silly tar absolute: 'C:\Users\stas.admin\Desktop\my-app\node_modules\recursive-readdir\test\testsymlinks\linkeddir\hi.docx', 11872 silly tar [Symbol(kCapture)]: false, 11872 silly tar [Symbol(flowing)]: true, 11872 silly tar [Symbol(paused)]: false, 11872 silly tar [Symbol(objectMode)]: false, 11872 silly tar [Symbol(encoding)]: null, 11872 silly tar [Symbol(decoder)]: null, 11872 silly tar [Symbol(EOF)]: true, 11872 silly tar [Symbol(emittedEnd)]: true, 11872 silly tar [Symbol(emittingEnd)]: false, 11872 silly tar [Symbol(closed)]: false, 11872 silly tar [Symbol(bufferLength)]: 0, 11872 silly tar [Symbol(destroyed)]: false 11872 silly tar }, 11872 silly tar cwd: 'C:\Users\stas.admin\Desktop\my-app\node_modules\recursive-readdir', 11872 silly tar tarCode: 'TAR_ENTRY_ERROR' 11872 silly tar } 11873 timing reifyNode:node_modules/recursive-readdir Completed in 617434ms 11874 warn tar TAR_ENTRY_ERROR EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\node-notifier\vendor\mac.noindex\terminal-notifier.app\Contents\Resources\en.lproj\Credits.rtf' 11875 silly tar Error: EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\node-notifier\vendor\mac.noindex\terminal-notifier.app\Contents\Resources\en.lproj\Credits.rtf' 11875 silly tar TAR_ENTRY_ERROR EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\node-notifier\vendor\mac.noindex\terminal-notifier.app\Contents\Resources\en.lproj\Credits.rtf' [Error: EPERM: operation not permitted, open 'C:\Users\stas.admin\Desktop\my-app\node_modules\node-notifier\vendor\mac.noindex\terminal-notifier.app\Contents\Resources\en.lproj\Credits.rtf'] { 11875 silly tar errno: -4048, 11875 silly tar code: 'EPERM', 11875 silly tar syscall: 'open', 11875 silly tar path: 'C:\Users\stas.admin\Desktop\my-app\node_modules\node-notifier\vendor\mac.noindex\terminal-notifier.app\Contents\Resources\en.lproj\Credits.rtf', 11875 silly tar entry: ReadEntry { 11875 silly tar _events: [Object: null prototype] {}, 11875 silly tar _eventsCount: 0, 11875 silly tar _maxListeners: undefined, 11875 silly tar pipes: Yallist { tail: [Node], head: [Node], length: 1 }, 11875 silly tar buffer: Yallist { tail: null, head: null, length: 0 }, 11875 silly tar writable: false, 11875 silly tar readable: false, 11875 silly tar extended: null, 11875 silly tar globalExtended: null, 11875 silly tar header: Header { 11875 silly tar cksumValid: true, 11875 silly tar needPax: false, 11875 silly tar nullBlock: false, 11875 silly tar block: null, 11875 silly tar path: 'package/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/Credits.rtf', 11875 silly tar mode: 420, 11875 silly tar uid: null, 11875 silly tar gid: null, 11875 silly tar size: 436, 11875 silly tar mtime: 1985-10-26T08:15:00.000Z, 11875 silly tar cksum: 11653, 11875 silly tar linkpath: '', 11875 silly tar uname: '', 11875 silly tar gname: '', 11875 silly tar devmaj: 0, 11875 silly tar devmin: 0, 11875 silly tar atime: null, 11875 silly tar ctime: null, 11875 silly tar [Symbol(type)]: '0' 11875 silly tar }, 11875 silly tar startBlockSize: 512, 11875 silly tar blockRemain: 0, 11875 silly tar remain: 0, 11875 silly tar type: 'File', 11875 silly tar meta: false, 11875 silly tar ignore: false, 11875 silly tar path: 'vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/Credits.rtf', 11875 silly tar mode: 438, 11875 silly tar uid: null, 11875 silly tar gid: null, 11875 silly tar uname: '', 11875 silly tar gname: '', 11875 silly tar size: 436, 11875 silly tar mtime: 1985-10-26T08:15:00.000Z, 11875 silly tar atime: null, 11875 silly tar ctime: null, 11875 silly tar linkpath: '', 11875 silly tar absolute: 'C:\Users\stas.admin\Desktop\my-app\node_modules\node-notifier\vendor\mac.noindex\terminal-notifier.app\Contents\Resources\en.lproj\Credits.rtf', 11875 silly tar [Symbol(kCapture)]: false, 11875 silly tar [Symbol(flowing)]: false, 11875 silly tar [Symbol(paused)]: true, 11875 silly tar [Symbol(objectMode)]: false, 11875 silly tar [Symbol(encoding)]: null, 11875 silly tar [Symbol(decoder)]: null, 11875 silly tar [Symbol(EOF)]: true, 11875 silly tar [Symbol(emittedEnd)]: true, 11875 silly tar [Symbol(emittingEnd)]: false, 11875 silly tar [Symbol(closed)]: false, 11875 silly tar [Symbol(bufferLength)]: 0, 11875 silly tar [Symbol(destroyed)]: false 11875 silly tar }, 11875 silly tar cwd: 'C:\Users\stas.admin\Desktop\my-app\node_modules\node-notifier', 11875 silly tar tarCode: 'TAR_ENTRY_ERROR' 11875 silly tar } 11876 timing reifyNode:node_modules/node-notifier Completed in 759886ms 11877 timing npm Completed in 843699ms 11878 error cb() never called! 11879 error This is an error with npm itself. Please report this error at: 11880 error https://github.com/npm/cli/issues

TaXueWuH commented 3 years ago

npm install

❯ npm -v 6.14.11 ❯ node -v v14.16.0

2021-03-16T09_50_48_003Z-debug.log

blazardsky commented 3 years ago

Afaik this is resolved by force-clearing the cache and upgrading / updating to the latest npm version.

I encounterd this error while trying to npm install responsive-loader jimp --save-dev Clearing the cache solved immediately this problem. Thanks @DanielRuf

Danish-Ali097 commented 3 years ago

i encountered this error while running npx create-react-app testapp

captain-aman-11 commented 3 years ago

npm ERR! cb() never called!

I encountered this error while runningmeteor npm install. Any fix for it ??

ustas4 commented 3 years ago

thanx to @TaXueWuH it's work!

SiddharthShyniben commented 3 years ago

By the way, I noticed that this also happens when you abruptly terminate an installation. Just FYI.

theBstar commented 3 years ago

I encountered this issue while running npx react-native init someProject. I was on a slow network connection and the installation got terminated midday. Running npx react-native init someProject again resulted in react-native command not found. Clearing npx cache helped. https://stackoverflow.com/questions/63510325/how-can-i-clear-the-central-cache-for-npx

SiddharthShyniben commented 3 years ago

My probably-wrong hypothesis is that maybe when we terminate any action before the cb() callback gets called we have this error. As I read on the wiki, it happened because the process gets exited (by net problems, us terminating, etc.) before the callback is called. (See [this wiki](https://github.com/npm/cli/wiki/%22cb()-never-called%3F--I'm-having-the-same-problem!%22)). I'm telling you I'm probably wrong

JayeshGohel commented 3 years ago

Got npm ERR! cb() never called! while executing npm install. Any fix for this? Below is the image showing the warnings and errors I am getting npm error

Ally4 commented 3 years ago

Before the end of the process of npm install, I get this error npm ERR! cb() never called!