Reputation: 161
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
Upvotes: 2
Views: 3090
Reputation: 5786
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 then npm 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 -
Upvotes: 1