Reputation: 11
I am using node.js (version 16) in my Visual Studio code editor, but while installing the react.js
I am getting an error:
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
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