7

Getting error 404 while running npm install create-react-app or npm install -g npm@latest.

Log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'create-react-app' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 1f3eafc1b2f09e93
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 404 http://registry.npmjs.org/create-react-app 66ms
8 silly fetchPackageMetaData error for create-react-app@latest 404 Not Found: create-react-app@latest
9 verbose stack Error: 404 Not Found: create-react-app@latest
9 verbose stack     at fetch.then.res (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
9 verbose stack     at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
9 verbose stack     at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
9 verbose stack     at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
9 verbose stack     at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
9 verbose stack     at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
9 verbose stack     at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
9 verbose stack     at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
9 verbose stack     at Immediate.Async.drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
9 verbose stack     at runCallback (timers.js:810:20)
9 verbose stack     at tryOnImmediate (timers.js:768:5)
9 verbose stack     at processImmediate [as _immediateCallback] (timers.js:745:5)
10 verbose cwd M:\Projects\TestApps\ReactApp
11 verbose Windows_NT 6.1.7601
12 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "create-react-app"
13 verbose node v8.11.3
14 verbose npm  v5.6.0
15 error code E404
16 error 404 Not Found: create-react-app@latest
17 verbose exit [ 1, true ]
1
  • npm v - 5.6.0 and node v - v8.11.3 Commented Jan 17, 2019 at 15:08

9 Answers 9

12

First check if is a Proxy Issue.

Try to install the package with another internet connection!

Another causes

Missing repository registry

$ npm set registry https://registry.npmjs.org/

Clean cache

$ npm cache clean
$ npm rebuild
Sign up to request clarification or add additional context in comments.

8 Comments

Thanks for quick response. But I am getting bellow error - npm ERR! code E404 npm ERR! 404 Not Found: npm@latest
Can you try with other internet net? So we discard the chance of firewall configuration??
Thanks Eugenio. It was proxy issue. I updated proxy and registry now its working. :)
Good to help! I modified my answer so you can mark as approved and help other people :)
@VivekFutane Was this the solution??
|
3

My problem also same but when I try following commands then works fine

If you've previously installed create-react-app globally via npm install -g create-react-app, I recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version.

Then reinstall using

npm install -g create-react-app

Comments

1

The newest way to do this would be to use npx.

npx create-react-app my-app [...options]

I use this method because I also use nvm to manage node installs. Everything just plays nice with this method.

Comments

1

Try uninstalling the current version of npm and install the latest version using

npm install -g create-react-app

Comments

0

You have already installed the npm create-react-app globally. You can just write

 npm init react-app *projectFolderName* 

and it will work just fine.

Comments

0

For me restarting my code editor did the job

Comments

0

I was having the same problem for almost a week here is my simple solution if you are using windows

  1. run cmd as admin.
  2. put this url npm config set registry https://skimdb.npmjs.com/registry on cmd.
  3. then type npx create-react-app@latest **YourProjectName**

Comments

0

1, npm cache verify 2, npm rebuild 3, npm uninstall -g create-react-app 4, npm install -g create-react-app 5, npx create-react-app

Comments

-3

You can try this command, which has worked for me:

npm config set strict-ssl false

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.