I can't install react using npx create-react-app?

后端 未结 15 1084
渐次进展
渐次进展 2020-12-29 06:15

I am trying to use npx create-react app but i have errors that is shown below:

npm ERR! Unexpected end of Json input w         


        
15条回答
  •  时光取名叫无心
    2020-12-29 06:57

    I had the same problem in creating react project when I used commands from official source https://reactjs.org/docs/create-a-new-react-app.html#create-react-app

    npx create-react-app my-app
    cd my-app
    npm start
    

    The above commands din't work on my windows. I have Node >= 6 and npm >= 5.2 on my machine even then it is not able to open localhost:3000 then I used this commands

    npm install -g create-react-app
    create-react-app my-app-name
    cd my-app-name
    npm start
    

    It worked perfectly fine. I learned from https://www.youtube.com/watch?v=pCgDRgmfilE

提交回复
热议问题