0

guys. I'm having a trouble when using npx create-react-app script. Whenever I try to create a react app, it's always show like this:

Creating a new React app in C:\USER\User\Document\GitHub\Projects

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

And it always stuck in there. I ever leave it for almost eight hours, but still it ain't work.

I've been trying to do npm install npm@latest -g to install the latest version of my npm, but still it doesn't work. I even have tried to uninstall the NodeJS in my computer, then reinstall it.

Earlier, I've always done my react projects with this method:

npm init
npm install create-react-app
npm create-react-app my-project

Unfortunately, after a week, I cannot do npm start for every react project that I've made before using that method. I also have tried to use the same method to create a new react project, but still it always stuck in the same part. I really need your help guys.

I'm using the latest version of VSCode on Windows 8.1 by the way.

Thank you in advanced.

  • What Node version are you on? `node -v` – Thales Kenne Jan 11 '21 at 14:43
  • It's 15.5.1 current version – Richa Purba Jan 11 '21 at 14:52
  • Have you tried starting a project in a different directory? Remove the global `create-react-app` and the use `npx create-react-app` but in a different directory. – isAif Jan 11 '21 at 15:06
  • Yes, then some errors coming up. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template... npm ERR! cb() never called! npm ERR! This is an error with npm itself. Please report this error at: npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\USER\AppData\Roaming\npm-cache\_logs\2021-01-11T15_46_39_732Z-debug.log – Richa Purba Jan 11 '21 at 15:48

1 Answers1

1

Most likely you might be hosting an old version of create-react-app Here are some processes for you to try out:

  1. Uninstall the global version of create-react-app. npm uninstall -g create-react-app
  2. Run the following command to delete the create-react-app manually. rm -rf /usr/local/bin/create-react-app
  3. Now, you can use the npx create-react-app command to create a new app.
eliday
  • 156
  • 1
  • 3