facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.22k stars 26.68k forks source link

Cant create npx create-react-app #13385

Open jndayele opened 9 months ago

jndayele commented 9 months ago

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! Screenshot 2023-09-26 182703

michaelwaves commented 9 months ago

Did you install nodejs and npm? https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

Manveer-Pbx1 commented 9 months ago

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.

itzabhinavarya commented 9 months ago

Following Steps might works:

  1. Download/Update the lastest version of node.js and npm.
  2. Try creating a seperate repo, cd over that repo and then after run the npx create-react-app yourappname
Blossomeze commented 8 months ago

The following steps might help you fix this issue:

  1. Download/Update the latest version of node.js and npm.
  2. Check the syntax for the name you are trying to assign to your app.
  3. Check your internet connection because sometimes a bad network hinders the successful creation of the React app.
  4. Cached data might be causing problems. You can clear the npm cache by running: npm cache clean --force
  5. You can also check for error messages as well and detail your problems to have more accurate solutions.
asharma-dev commented 8 months ago

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.

Akbar-Rouzi commented 3 months ago

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

Akbar-Rouzi commented 1 week ago

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.