You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🐞 [BUG] "npm ERR! cb() never called!" or "Exit handler never called" #417
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.
Note: Please read this doc before filing a new issue or adding a comment to this thread.
I'm not going to give you too many details basically because I will probably give you wrong or not related information but I solved this issue that in my case it was related with this specific package as a dependency: amplify-cli (npm intall --save amplify-cli)
This is what happened
I removed the package.
I upgrade npm
I tried to install amplify-cli with save again then I got the ERR! cb() error
Details:
I had installed this package before (as I said)
I had installed this dependencies: graphql and @types/grapthl (I cannot tell if it was a mistake install those)
I remove them, then ran npm install --save amplify-cli and the install worked fine (this package was the one giving me the ERR! cb() error message)
I understand this errors are specific, but maybe it could be helpful if this thing about @types/ is the problem
Important
Now I'm in a nightmare called Try npm install @types/graphql if it exists so take you time and think twice if you're gonna do that 🙅🏽 I cannot remember how did I solve this before
Solved
Jesus! that was horrible.. The only way I could solve that try to intall bulls~~ was restarting the container after npm install --save but I did it before without restart and it did not work.. I cannot imagine if it is a problem with VScode, angular, npm, cache.. you name it. Luck for me it was a container
I got same error. and FIXED IT.
I was trying to dockerize a nodejs project with a docker file. and package.json.
on my ubuntu machine there is no problem, but on CI/CD machine (centos,debian) almost fails to dockerize
Tried Steps:
clear node_modules
updating node version
updating npm version
centos
debian
docker with different versions
lots of configuration (npm install fetch-retries, timeouts ....)
My problem:
My problem was at TCP level.
some of the TCP connections to registry.npmjs.org was returning RESET.
with tcpdump I saw that if npm install fails cb() never called, I got TCP RESET packets from registry.npmjs.org ips.
if npm install success, then no TCP RESET from registry.npmjs.org ips.
I dont know why TCP RESET occurs. big network problem
My Solution:
I putted registry.npmjs.org behind of an NGINX proxy on K8
and changed dockerfile npm install ====> npm install --strict-ssl=false (because nginx will return a default ssl)
docker build -t tag myproject --add-host registry.npmjs.org:nginxip . (redirect all npm install trafic to your nginx)
the only suck thing I know is that the warning message of npm publish is indirect and not clear
when you have not verify your email, just tell that they haven't verified the email, not something like security policy thing and package version problem...
I was getting the same error when I was trying to install "netlify-cli" command is C:Users>MyName>npm install netlify-cli -g,
I upgraded npm version LTS to LATEST with this command >npm i -g npm@latest,
Still not work then,
I just deleted the log file from here ~/AppData/Local/npm-cache/_logs/2021-05-19T18_46_01_599Z-debug.log using git bash,
$ rm ~/AppData/Local/npm-cache/_logs/2021-05-19T18_46_01_599Z-debug.log,
which was showing with the error in cli,
Try again, Installed Successfully.
Hello, I ma receiving this error while using WSL2 Ubuntu 20.04. I have installed node and npm via nvm. I am trying to run npx create-react-app projectname but I keep running into the issue. I am not sure what is causing it as I have the latest version of both npm and npx. Any assistance on this would be very helpful. Thanks.
changed the title [-]🐞 [BUG] "npm ERR! cb() never called!"[/-][+]🐞 [BUG] "npm ERR! cb() never called!" or "Exit handler never called"[/+]on Jun 23, 2021
Activity
DanielRuf commentedon Nov 11, 2019
I think we have many reports of the same so these should all be duplicates.
#423
#425
#442
#451
#455
#465
Afaik this is resolved by force-clearing the cache and upgrading / updating to the latest npm version.
DanielRuf commentedon Nov 11, 2019
#303
#306
#325
#353
#369
#370
#375
#383
#408
#418
#448
#474
#499
#522
ruyadorno commentedon Nov 11, 2019
thanks @DanielRuf for linking all those ❤️
ruyadorno commentedon Nov 19, 2019
#489
DanielRuf commentedon Dec 8, 2019
#544
#552
#553
#556
#566
#570
#571
#573
#574
#581
#584
#585
#594
#596
#618
#630
#634
DanielRuf commentedon Dec 25, 2019
I guess we can check which version first introduced this (doing a small
git bisect) and check the stacktraces for similarities.DanielRuf commentedon Dec 25, 2019
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 commentedon Dec 25, 2019
Relevant changes in the past tolog this error: npm/npm#15716
DanielRuf commentedon Dec 25, 2019
Tests with a local npm 6.13.1 (on macOS):
@vue/cli: not reproduciblenpm audit fix: not reproducibleplotly.js: not reproducibleexpo-cli: not reproducibleSo 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 commentedon Jan 4, 2020
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 commentedon Jan 4, 2020
(note that must be nvm-windows; actual nvm doesn't work on non-WSL Windows, and doesn't distinguish 64-bit)
mdouglass commentedon Jan 4, 2020
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@latest2020-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.
60 remaining items
Karmavil commentedon Apr 19, 2021
Hi. thanks for this note it was helpful:
I'm not going to give you too many details basically because I will probably give you wrong or not related information but I solved this issue that in my case it was related with this specific package as a dependency: amplify-cli (npm intall --save amplify-cli)
This is what happened
Details:
I understand this errors are specific, but maybe it could be helpful if this thing about @types/ is the problem
Important
Now I'm in a nightmare called Try
npm install @types/graphqlif it exists so take you time and think twice if you're gonna do that 🙅🏽 I cannot remember how did I solve this beforeSolved
Jesus! that was horrible.. The only way I could solve that try to intall bulls~~ was restarting the container after
npm install --savebut I did it before without restart and it did not work.. I cannot imagine if it is a problem with VScode, angular, npm, cache.. you name it. Luck for me it was a containerhamzakilic commentedon May 1, 2021
I got same error. and FIXED IT.
I was trying to dockerize a nodejs project with a docker file. and package.json.
on my ubuntu machine there is no problem, but on CI/CD machine (centos,debian) almost fails to dockerize
Tried Steps:
My problem:
My problem was at TCP level.
some of the TCP connections to registry.npmjs.org was returning RESET.
with tcpdump I saw that if npm install fails cb() never called, I got TCP RESET packets from registry.npmjs.org ips.
if npm install success, then no TCP RESET from registry.npmjs.org ips.
I dont know why TCP RESET occurs. big network problem
My Solution:
I putted registry.npmjs.org behind of an NGINX proxy on K8
and changed dockerfile
npm install ====> npm install --strict-ssl=false (because nginx will return a default ssl)
docker build -t tag myproject --add-host registry.npmjs.org:nginxip . (redirect all npm install trafic to your nginx)
below is the sample K8 ingress
KogaiIrina commentedon May 2, 2021
Hi! I got this error when I was running npm install
node -v
v14.16.0
npm -v
7.10.0
I solved this problem by updating my npm
HomyeeKing commentedon May 11, 2021
the only suck thing I know is that the warning message of
npm publishis indirect and not clearwhen you have not verify your email, just tell that they haven't verified the email, not something like security policy thing and package version problem...
KZRepository commentedon May 11, 2021
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://github.com/npm/cli/issues
fetch GET 304 https://registry.npmjs.org/grunt-cssnano 784ms (from cache)
1900 timing metavuln:packument:grunt-cssnano Completed in 786ms
1901 timing metavuln:load:security-advisory:grunt-cssnano:EtYBVUQGQLlhlpJr8KS/6Ije2vBT1OrDb4ZylGjBbqEpHu5oNhsP45j3VEbnmDsxSDP8IWOiIk4/CNRyBk/RpQ== Completed in 1ms
1902 timing metavuln:cache:put:security-advisory:grunt-cssnano:6zfI7LzZ7jhTaIHReTadx2z1+1e771qctuX2ezhF2HjxeHbwezKe6xIw4RwD9LlZN7IMyqdkoz3KNhgkx78nwQ== Completed in 10ms
1903 timing metavuln:calculate:security-advisory:grunt-cssnano:EtYBVUQGQLlhlpJr8KS/6Ije2vBT1OrDb4ZylGjBbqEpHu5oNhsP45j3VEbnmDsxSDP8IWOiIk4/CNRyBk/RpQ== Completed in 797ms
1904 timing auditReport:init Completed in 24937ms
1905 timing reify:audit Completed in 27613ms
1906 http fetch GET 200 https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz 25743ms
1907 timing reifyNode:node_modules/caniuse-lite Completed in 27883ms
1908 timing npm Completed in 43488ms
1909 error cb() never called!
1910 error This is an error with npm itself. Please report this error at:
1911 error https://github.com/npm/cli/issues
Ubaid-Ali commentedon May 19, 2021
Worked for me but I don't know is it true or not,
I was getting the same error when I was trying to install "netlify-cli" command is C:Users>MyName>npm install netlify-cli -g,
I upgraded npm version LTS to LATEST with this command >npm i -g npm@latest,
Still not work then,
I just deleted the log file from here ~/AppData/Local/npm-cache/_logs/2021-05-19T18_46_01_599Z-debug.log using git bash,
$ rm ~/AppData/Local/npm-cache/_logs/2021-05-19T18_46_01_599Z-debug.log,
which was showing with the error in cli,
Try again, Installed Successfully.
RedHoodJT1988 commentedon May 24, 2021
Hello, I ma receiving this error while using WSL2 Ubuntu 20.04. I have installed node and npm via nvm. I am trying to run npx create-react-app projectname but I keep running into the issue. I am not sure what is causing it as I have the latest version of both npm and npx. Any assistance on this would be very helpful. Thanks.
[-]"npm ERR! cb() never called!"[/-][+]🐞 `"npm ERR! cb() never called!"`[/+][-]🐞 `"npm ERR! cb() never called!"`[/-][+]🐞 [BUG] `"npm ERR! cb() never called!"`[/+][-]🐞 [BUG] `"npm ERR! cb() never called!"`[/-][+]🐞 [BUG] "npm ERR! cb() never called!"[/+][-]🐞 [BUG] "npm ERR! cb() never called!"[/-][+]🐞 [BUG] "npm ERR! cb() never called!" or "Exit handler never called"[/+]