5

I was trying to run npm install inside the project folder but every time there is this error showing npm cb() never called.

I am using node version 10.16.2 and npm version 6.9.0 in windows 10

I have tried npm cache clean --force but that didn't help

E:\contribution\contribute-to-open-source>npm install
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\papun\AppData\Roaming\npm-cache\_logs\2019-08-10T03_51_20_512Z-debug.log
richard937
  • 71
  • 1
  • 2
  • 9

6 Answers6

14

I had the same problems and lost hours trying to solve it :(.

But then i found out that my firm has installed some new kind of firewall with self signed certificate.

Quick solution was:

npm config set strict-ssl=false

After that everything started working without 'npm cb() never called' errors

Matjaz
  • 681
  • 6
  • 6
3

run this all issue will be solved..

 npm install --global windows-build-tools
1

I had faced the same issue, and i spend days to get a solution for the issue. In the end, i figured it out and it was an issue with my network.

Please verify your network connection and proxy settings.

In my case, I was using corporate proxy using a script. When i opened the pac file and get the proxy from there ( take XXX:XXX from the line return "PROXY XXX:XXX;";) and added to npm config proxy setting (npm config set proxy XXX:XXX), it started working and got resolved.

0

I have deleted all the node_modules, package-lock.json but still it was not working. For me the reason was, there were some modules that required relogin to install.

So, I deleted my node_modules, build and package-lock.json. and opened command prompt in admin mode.

Then went to the specific project path and logged-in to the components that require credentials.

1. npm login (root path of your react app)
2. type username as "<xxxxx>"
3. type password as "<yyyyy>" (won't be visible on console)
4. type email as "<zzzz>@<aaa>.com"
5. npm i
6. npm run build

It worked for me.

KushalSeth
  • 838
  • 7
  • 16
0

try to set your proxy using the commands

  • npm config set proxy http://proxy_host:port
  • npm config set https-proxy https://proxy_host:port
RuchDi
  • 1
0

I also faced the same problem I deleted that file from

C:\Users\Harshk1311\AppData\Roaming\npm-cache\_logs

And problem solved

  • Double Check file name in terminal where error occured and delete file
  • i.e C:\Users\Harshk1311\AppData\Roaming\npm-cache_logs\2019-08-10T03_51_20_512Z-debug.log
  • Delete 2019-08-10T03_51_20_512Z-debug.log only this file .
Eric Aya
  • 68,765
  • 33
  • 165
  • 232
harshk1311
  • 46
  • 4