Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I've been trying to create a react app but I keep getting this error: "npm ERR! cb() never called!"

this is the problem

HP@DESKTOP-1HP83V8 MINGW64 ~/Desktop/Web-Development (master) $ npx create-react-app my-app

Creating a new React app in C:\Users\HP\Desktop\Web-Development\my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

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\HP\AppData\Roaming\npm-cache_logs\2020-11-20T11_50_51_060Z-debug.log

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts >cra-template has failed.

like image 791
Francis Avatar asked Dec 10 '22 00:12

Francis


1 Answers

I've encountered this multiple times.

First I would suggest that you run npm uninstall -g create-react-app since the global version isn't supported anymore.

Then try npx create-react-app my-app again.

If that does not work, try to run:

npm init

npm install create-react-app

npx create-react-app my-app

The steps above have solved the issue for me a couple of times

like image 138
idkwhatsgoingon Avatar answered Feb 12 '23 12:02

idkwhatsgoingon