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

后端 未结 15 1083
渐次进展
渐次进展 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 07:05

    The problem arises due to so many reasons.

      1. This happens is if one of the node modules requires to install your react app is missing.
      1. The other reason is if your have and unstable network connection.
      1. Sometimes, but on rare cases, your antivirus may assume the cmd files in your cache to be malware.

    if your antivirus is your issue, disable it for the period you run the commands.

    Whatever the reason for npx create-react-app is not working on your machine, run the following commands in sequence:

    npm cache clean --force 
    npx create-react-app my-app  
    

    let me know if this worked for you

提交回复
热议问题