Reputation: 27
NPM errors while installing react.js
[![enter image description here][1]][1]
[1]: https://i.sstatic.net/0fRAy.png**strong text**
Upvotes: 0
Views: 3834
Reputation: 355
Solution 1: Force to the latest version Just try to run the create command with force to the latest version. Just like this:
npx create-react-app@latest_version my-app --use-npm
And the latest version is 5.0.0 so just try this command:
npx [email protected] my-app
Now, your error must be solved.
Solution 2:
Clear the cache You just need to clear your cache and then you can create a new React project. First of all, clear the cache by running this command:
npx clear-npx-cache
If it does not work, use this and try again: Delete everything from this path.
C:\Users\Your_user_name\AppData\Roaming\npm-cache
On macOS (and Linux), it’s ~/.npm/_npx. You can drop it in your terminal:
rm -rf ~/.npm/_npx
Or try the command npm cache clean --force using administrator mode in your terminal. Now, just re-enter your create command.
npx create-react-app my-app
Upvotes: 1
Reputation: 355
you can try this command npm cache clean --force then run npm install -g create-react-app@latest [here your app name] then you won't be able to see this e
Upvotes: 0