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
I had the same issue "Install for create-react-app@latest failed with code 7" Use this. It worked for me.
npm install -g create-react-app
npx create-react-app my-app
cd my-app
npm start
for further reference go to: https://www.techomoro.com/how-to-install-and-setup-a-react-app-on-windows-10/
If you are unable to create the app try reinstalling nodeJS in 32-bits and try it.
To fix the issue, run these commands in sequence
npm init
npm install create-react-app
npx create-react-app myapp
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
Clean npm cache:
npm cache clean --force
then try again
Sometime it happens because of slow internet speed. Try with this one.
npx create-react-app <app name> -timeout=60000
Default timeout=30000(30sec). increase timeout, if you necessary.