I want to get started with React.js and I am following their official documentation that states to use - npx create-react-app my-app
to install the app, but I am getting the error below every time. Please help

- 5,583
- 3
- 15
- 32

- 151
- 1
- 14
-
what do the contents of that log file say? – Luke Storry Jul 23 '20 at 19:27
1 Answers
You can try the following ways to resolve the error -
Delete everything from
C:\Users\your_pc_name\AppData\Roaming\npm-cache
This could be a local caching issue. Try the command
npm cache clean --force
using administrator mode in your terminal and then try again with the same command -npx create-react-app my-app
.If the above command doesn't work, try the same command or another similiar command -
npm cache clear --force
and thennpm install
after that. After this, you can run the commands to setup your react project and see if it works.
These were the point I have referred online from people who faced a similar issue. Try to see if any of the above steps resolve your issue.
I have aggregated the working solutions but if this still doesn't solve your problem, you could refer the links mentioning a similar problem -
- https://github.com/facebook/create-react-app/issues/7261
- Installing create-react-app gives npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near '...mojOzGIEI2rg0m24Yb5Oq'
- NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'
- Error installing reactjs: Error unexpected end of JSON input while parsing near

- 5,583
- 3
- 15
- 32