kalyani
kalyani

Reputation: 11

npm error "cb.apply is not a function" while installing the React.js in my Visual Studio code editor

I am using node.js (version 16) in my Visual Studio code editor, but while installing the react.js I am getting an error:

screenshot

C:\somedir\> npx create-react-app test

...

npm ERR! cb.apply is not a function 

I tried several things, such as installing different versions of node.js, but every time I get the same error.

Upvotes: 1

Views: 904

Answers (1)

Veer Pratap
Veer Pratap

Reputation: 295

Check if you have correctly installed the latest version of Node.js on your system.

Make sure that you are running the latest version of create-react-app by running the command:

npm install -g create-react-app

Try deleting the node_modules directory and running npm install again to reinstall all the dependencies.

If the issue persists, try running npm cache clean --force to clear the npm cache, and then try running npm install again.

Check if there are any errors in your code by inspecting the browser console or the terminal output.you can share more about the error details here

Upvotes: 0

Related Questions