create-react-app
create-react-app copied to clipboard
Cant create npx create-react-app
My "npx create-react-app my-app" doesnt work anytime I run it through my windows. They keep telling errors has occured. Errors like:
npm ERR! code ENOENT and others. Please help me out!
Did you install nodejs and npm? https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
Hi, it seems you have just selected the Desktop directory. Try making a new folder and then change the directory as follows: cd Desktop> cd [yourFolderName] and then the commands, the problem will be solved.
Following Steps might works:
- Download/Update the lastest version of node.js and npm.
- Try creating a seperate repo, cd over that repo and then after run the npx create-react-app yourappname
The following steps might help you fix this issue:
- Download/Update the latest version of node.js and npm.
- Check the syntax for the name you are trying to assign to your app.
- Check your internet connection because sometimes a bad network hinders the successful creation of the React app.
- Cached data might be causing problems. You can clear the npm cache by running: npm cache clean --force
- You can also check for error messages as well and detail your problems to have more accurate solutions.
There must be something wrong with Node version, try the lts version and make sure to verify using node -v. If not correct switch to the desired version using nvm.
I had this same issue but now found a solution and I think this is the simplest way to do it.
go to path :
C:\Users\_YOUR USER NAME HERE_\AppData\Roaming\
and create a new folder called "npm"
now bug fixed
Run this command
npm uninstall -g create-react-app
.
the command above help you add npm folder to the path C:\Users\_YOUR USER NAME HERE_\AppData\Roaming\npm
then
npx create-react-app my-app
should work. That worked for me.