React: 'create-react-app' is not recognized as an internal or external command

Dung Do Tien Jun 05 2021 9

I am trying to set up react app using create-react-app command on windows pc. But I encounter error 'create-react-app' is not recognized as an internal or external command.

with the same command, it works for me on my MacOs. Below is the error detail:

 C:\Users\ugur\Desktop\deneme>npm install -g create-react-app
C:\Users\ugur\AppData\Roaming\npm\create-react-app -> C:\Users\ugur\
AppData\Roaming\npm\node_modules\create-react-app\index.js
C:\Users\ugur\AppData\Roaming\npm
`-- [email protected]
  +-- [email protected]
  | +-- [email protected]
  | +-- [email protected]
  | +-- [email protected]
  | | `-- [email protected]
  | +-- [email protected]
  | `-- [email protected]
  +-- [email protected]
  | +-- [email protected]
  | | +-- [email protected]
  | | `-- [email protected]
  | `-- [email protected]
  |   `-- [email protected]
  +-- [email protected]
  `-- [email protected]

C:\Users\ugur\Desktop\deneme>create-react-app new_app

'create-react-app' is not recognized as an internal or external command, operable program or batch file.

How can I resolve this issue?

Have 2 answer(s) found.
  • K

    Kingtub Kakkak Jun 05 2021

    I solved the problem by adding C:\Users\ugur\AppData\Roaming\npm to the windows PATH variable.

    Pls check correct path to npm folder.

  • T

    Trọng Hiếu Jun 05 2021

     You need to re-install the latest version of node and try the latest version of React.

     npm install -g npm-windows-upgrade
    npm-windows-upgrade

    And then

     npm install -g create-react-app
    create-react-app my-app

    I hope it useful for you!

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close