create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

Cant create npx create-react-app

Open jndayele opened this issue 1 year ago • 7 comments

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

jndayele avatar Sep 26 '23 18:09 jndayele

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

michaelwaves avatar Sep 28 '23 06:09 michaelwaves

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.

Manveer-Pbx1 avatar Oct 02 '23 19:10 Manveer-Pbx1

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

itzabhinavarya avatar Oct 03 '23 17:10 itzabhinavarya

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.

0xBlyn avatar Oct 17 '23 09:10 0xBlyn

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.

asharma-dev avatar Oct 19 '23 22:10 asharma-dev

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 avatar Mar 18 '24 20:03 Akbar-Rouzi

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.

Akbar-Rouzi avatar Jun 27 '24 18:06 Akbar-Rouzi