0

NPM errors while installing react.js

[![enter image description here][1]][1]

[1]: https://i.sstatic.net/0fRAy.png**strong text**

2 Answers 2

1

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
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.