0

I'm having problem installing create-react-app on my windows 10. I have followed these steps but it's taking way too long and then the process stopped. These are the steps i followed:

npm install -g create-react-app

create-react-app myproject

I have also tried installing the package using this code:

npx create-react-app my-app

but it took way too long and never downloaded.

Thanks in advance.

Helia Amini
  • 23
  • 1
  • 5

2 Answers2

0

According to the documentation:

If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version.
(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

So to create a new app run:

npx create-react-app my-project

This creates a new app called my-project
To start the app:

cd my-project
npm start
Tomanator
  • 18
  • 5
  • Thank you for your help but a small problem when running the command npx create-react-app my-project i got an error saying operation not permitted and that command create-react-app was not found. – Helia Amini Jul 16 '20 at 11:52
  • It could be an issue with Node not being set up correctly on your machine. Ensure that node is included in your PATH environment variable so the system knows where to look for the command. See https://stackoverflow.com/questions/38751830/create-react-app-installation-error-command-not-found If you search environment variables on Windows you can edit the system environment variables and add node to your PATH variable. – Tomanator Jul 16 '20 at 12:16
0

Follow the instructions on this website and you should be able to install Gatsby correctly without failure. Also, do note that you'd be prompted most times to do an audit which is meant to give report on vulnerabilities in dependencies, this always doesn't mean the app or setup is not installed, it just mean npm audit fix command can help when runed to provide a fix. In most cases, your setup or app should work fine even with the warning from NPM

Romeo
  • 740
  • 1
  • 5
  • 21