-1

I get this error when I try to install node

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\lenovo\AppData\Roaming\npm-cache\_logs\2020-08-29T13_30_35_085Z-debug.log
TERMINATOR
  • 1,180
  • 1
  • 11
  • 24
Yamuna GC
  • 1
  • 1
  • Can you post what commands you are using to install node? – Jatin Mehrotra Aug 29 '20 at 14:28
  • 1
    What’s in the log file? What stage in the node install process are you at? I’m confused: are you installing node as you state, or are you running npm or create-react-app or ...? – Dave Newton Aug 29 '20 at 14:31
  • Does this answer your question? [npm ERR cb() never called](https://stackoverflow.com/questions/15393821/npm-err-cb-never-called) – Danish Aug 30 '20 at 23:16

2 Answers2

0
  1. try this first before installing node.

     sudo npm cache verify
    
     sudo npm cache clean --force
    
  2. After installing verify your installation:

    node --version

Dharman
  • 30,962
  • 25
  • 85
  • 135
Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67
0

several things you can try are following

sudo npm cache clean --force

trying changing ownership of npm and try npm latest

sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib
sudo chown -R $(whoami) /usr/local/bin
npm install -g npm@latest

give it a try by clearing up the proxy, maybe you're behind proxy

npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/

Lately i would like to recommend you to use the NVM package. it is not the solution to your answer directly but its a great way to manage and have different node/npm environments https://davidwalsh.name/nvm

Danish
  • 1,467
  • 19
  • 28