javascriptnode.jsreactjsnpmcreate-react-app

`npm create-react-app` returns an error in Windows


just tried creating my first react app but surely react is not in a mood to welcome me.

Just after installing everything node and create-react-app even checking their versions to make sure they are installed. I moved on to creating the react app using npm create-react-app my-app command but it has given me this error and I am not able to resolve.

Error running command

I even tried updating the config file but it showed these errors as well.

Error running npm config


Solution

  • As specified in the create-react-app github repository wiki. Please go through the detailed step by step instructions.

    npx

    npx create-react-app my-app
    

    (npx is a package runner tool that comes with npm 5.2+ and higher)

    npm

    npm init react-app my-app
    

    npm init is available in npm 6+

    Yarn

    yarn create react-app my-app
    

    Reference Link: https://github.com/facebook/create-react-app#creating-an-app