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

前端 未结 22 1539
孤城傲影
孤城傲影 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:51

    First Check your Node version. if your node version is 8 or greater then 8 then use
    'npx create-react-app my-app'

    In the above version we need to change only one word that is npx

    You don't need to do another things. I hope this will help you

    0 讨论(0)
  • 2020-12-24 12:51
    • Run : npx install create-react-app nameOfYourFolder instead of npm install create-react-app nameOfYourFolder (npx comes with npm 5.2+ and higher)
    • Then : cd nameOfYourFolder
    • Then run : npm start

    You can find more in React documentation here

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

    I solved problem by following below steps

    1) open Node.js command prompt

    2) Then type "npm install create-react-app -g" (g for global access) command to install create-react-app

    3) Then type "npm install create-react-native-app -g" (g for global access) command to install create-react-native-app

    Follow step #2 for use create-react-app

    Follow step #3 only if you want to use create-react-native-app otherwise its optional.

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

    Another one that might work is to use Powershell and type:

    npx create-react-app new_app --use-npm
    
    0 讨论(0)
提交回复
热议问题