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

前端 未结 22 1537
孤城傲影
孤城傲影 2020-12-24 11:51

I am trying to set up react app using create-react-app command on windows pc. I already used it on my mac computer, and it works well. But I encounter a problem. Here my ste

相关标签:
22条回答
  • 2020-12-24 12:46

    This command requires the Expo-CLI. If you want to save time I recommend to you the Node.js command prompt and it will add the necessary dependencies automatically.

    0 讨论(0)
  • 2020-12-24 12:47

    This is the issue is mainly caused by two reasons:

    1. Path variable issue
    2. Npm version issue

    Add C:\Users\ugur\AppData\Roaming\npm to Windows PATH variable and upgrade npm version to 5.5.1

    0 讨论(0)
  • 2020-12-24 12:47

    User following command

    npx create-react-app my-app

    0 讨论(0)
  • 2020-12-24 12:48

    This is a windows variable path problem, i have faced the same problem recently, the following are possible root cause of the problem , installing node via nvm(node version manager) so to solve the issue in this case you after running npm install -g create-react-app got to the location in my case C:\Users\pc\AppData\Roaming\npm in the copy create-react-app to C:\Users\pc\AppData\Roaming\nvm\v12.18.3 and also move the folder in node_module folder called create-react-app to the specific version you are using under nvm , after that you should be able to use create-react-app without and issue. i hope this will help someone

    0 讨论(0)
  • 2020-12-24 12:49

    I also get same problem but I resolve it by following steps

    1. Check your global directory by using command npm root -g
    2. check the folder, will it have .cmd of your installed packages.
    3. If yes, Please copy the path of folder and put in path of user variables.

    Thanks

    0 讨论(0)
  • 2020-12-24 12:51

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

    0 讨论(0)
提交回复
热议问题