5

I had created reactjs project first I had installed globally create react app

npm install -g create-react-app

next, I try to project creation. am using this command

create-react-app react-firebase

while installing i had faced npm ERR! 404 Not Found: react-dev-utils@^5.0.2

error:

npm ERR! code E404
npm ERR! 404 Not Found: react-dev-utils@^5.0.2

How to fix it...

Ragu
  • 772
  • 9
  • 29

3 Answers3

6

i tried this yarn add -g react-dev-utils@https://registry.npmjs.org/react-dev-utils/react-dev-utils-5.0.2.tgz (remove the "/-/" from the URL) and then run create-react-app my-app and it worked.

or if using npm try:

npm install -g react-dev-utils@https://registry.npmjs.org/react-dev-utils/react-dev-utils-5.0.2.tgz
zharif
  • 76
  • 3
0

The problem is npm is not able to find react-dev-utils in the registry server. you can try different registries as mentioned here

Can't install any packages in Node.js using "npm install"

then you can solve this installing that package

npm install react-dev-utils@^5.0.2  -g
madhu131313
  • 7,003
  • 7
  • 40
  • 53
  • Is it install globally or project folder inside npm install react-dev-utils@^5.0.2 --save – Ragu Aug 30 '18 at 05:40
  • you can do either way but installing in your project is better – madhu131313 Aug 30 '18 at 05:42
  • this error throws while project creating so I can't install in project directory – Ragu Aug 30 '18 at 05:49
  • npm ERR! code E404 npm ERR! 404 Not Found: react-dev-utils@https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-5.0.2.tgz this is the output for the cmmand – askatral Aug 30 '18 at 07:24
  • try `npm set registry https://registry.npmjs.org/` and then run it again – madhu131313 Aug 30 '18 at 07:26
  • Same error C:\WINDOWS\system32>npm set registry https://registry.npmjs.org/ C:\WINDOWS\system32>npm install react-dev-utils@^5.0.2 -g npm ERR! code E404 npm ERR! 404 Not Found: react-dev-utils@https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-5.0.2.tgz – askatral Aug 30 '18 at 07:27
  • After referring to the link, I tried the command , npm set registry http://registry.npmjs.org/ and got the same output after install command: npm ERR! 404 Not Found: react-dev-utils@https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-5.0.2.tgz – askatral Aug 30 '18 at 07:38
  • Even if I try to set the registry with http link, in the error msg it still says the https link is not found – askatral Aug 30 '18 at 07:40
0

Something has changed in the registries. Explicitly adding the package didn't work for me, but flushing the lock files to remove reference to the old registry path did:

Yarn:

  • Delete yarn.lock
  • Run yarn

NPM:

  • Delete package-lock.json
  • Run npm install
Will Squire
  • 6,127
  • 7
  • 45
  • 57