Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm error : cb() never called, what should I do?

Hi everyone.

I've got an error from npm everytime I try to install pacakges. I got this error :

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

I know there's already a topic about my problem but I really tried every solution I could find and not a single one works. I uninstall and reinstall node multiple times, cleaned my cache but I can do nothing !

Here's my package.json

{
  "name": "XXXXXXXXXXX",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "axios": "^0.21.0",
    "discord.js": "^12.4.0",
    "howlongtobeat": "^1.2.1",
    "npm": "^6.14.8"
  },
  "devDependencies": {}
}

Can somebody help me, I don't know what to do, I cannot install a single package ...

Thanks !

like image 904
Pliboux Avatar asked Oct 20 '25 15:10

Pliboux


1 Answers

Just run:

npm cache clean --force
npm cache verify
npm install --global npm

The command lines are self explanatory. One needs to clear (clean) the cache and upgrade npm. After which, it should work.

like image 152
Raul Glez Rdguez Avatar answered Oct 22 '25 06:10

Raul Glez Rdguez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!