Search code examples
npmwindows-10create-react-app

problems Installing create-react-app on my windows10


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.


Solution

  • 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