1

Firstly, I am new to using npm AND react JS and the like so be gentle lol. I am having a great deal of trouble creating a new react application using the npm CLI in Visual Studio Code. The error log text is below in full:


0 info it worked if it ends with ok
1 verbose cli [
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@latest',
1 verbose cli   '--global',
1 verbose cli   '--prefix',
1 verbose cli   'C:\\Users\\xxxx\\AppData\\Roaming\\npm-cache\\_npx\\7488',
1 verbose cli   '--loglevel',
1 verbose cli   'error',
1 verbose cli   '--json'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session aeaef96635f9906e
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://github.com/npm/npm-registry-couchapp/create-react-app 458ms
8 http fetch GET 404 https://github.com/npm/npm-registry-couchapp/create-react-app 177ms
9 silly fetchPackageMetaData error for create-react-app@latest 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 804ms
12 verbose stack Error: 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
12 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:114:15
12 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)
13 verbose statusCode 404
14 verbose pkgid create-react-app@latest
15 verbose cwd C:\Users\xxxx\Documents\Development\Courses\JavaScript\react_todo
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "create-react-app@latest" "--global" "--prefix" "C:\\Users\\xxxx\\AppData\\Roaming\\npm-cache\\_npx\\7488" "--loglevel" "error" "--json"
18 verbose node v12.18.3
19 verbose npm  v6.14.6
20 error code E404
21 error 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
22 error 404
23 error 404 'create-react-app@latest' is not in the npm registry.
24 error 404 You should bug the author to publish it (or use the name yourself!)
25 error 404 Note that you can also install from a
26 error 404 tarball, folder, http url, or git url.
27 verbose exit [ 1, true ]

Obviously I can see that the github path it is trying to reach with the GET request does not exist and I have looked on quite a number of sites for this issue and everything I have tried so far has failed to fix the issue.

I have tried: npm uninstall -g followed by npm install -g create-react-app

I have tried clearing the npm cache using npm cache clean --force

Basically I am at loss and would truly greatly appreciate any guidance offered.

Thanks in advance! Dan

EDIT: The below is the text i get when i run the npx create-react-app myApp

npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
npm ERR! 404
npm ERR! 404  'create-react-app@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxxx\AppData\Roaming\npm-cache\_logs\2020-08-03T13_11_39_879Z-debug.log
Install for [ 'create-react-app@latest' ] failed with code 1
6
  • Are you using a proxy? Did you try installing the latest Node.js version? Commented Aug 3, 2020 at 10:39
  • I was using a VPN but have disconnected and tried again with no luck. I have only installed Node JS last night so on the latest version. Just in case, i repaired the install of Node JS just to be sure but that didn't resolve the issue either. Thank you Edit: I am NOT using a proxy Commented Aug 3, 2020 at 10:54
  • Try to use npx create-react-app APP_NAME Commented Aug 3, 2020 at 11:18
  • That IS how I was attempting to create the react application. The full command line is as follows: "npx create_react_app ." using the full stop to name project same as folder name. Thanks. Commented Aug 3, 2020 at 12:54
  • It is create-react-app. Use hyphens, not underscores. Commented Aug 3, 2020 at 12:57

2 Answers 2

1

The issue was the wrong registrty was being pointed at. Fixed with npm config set registry https://registry.npmjs.com/ run from a prompt or terminal. Thanks for those who attempted to help.

Sign up to request clarification or add additional context in comments.

Comments

0

Ciao, if you want to create an app from npm, try:

npm init react-app my-app

there is also a way using yarn:

yarn create react-app my-app

Check here for more info about create an app with create-react-app.

2 Comments

Thank you Giovanni, I had already tried these as well. I think it's just something to do with npm looking to the wrong git hub repository for the create-react-app. But I'm not sure where it is getting the url from. It is looking for github.com/npm/npm-registry-couchapp/create-react-app but from what I can see it should be pointing to github.com/facebook/create-react-app
I really don't know... I found this that is not precisely your problem (they talking about registry.npmjs.org/error-ex) but it's the same registry problem. Someone solved using VPN. You could try...

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.