I am new to reactjs, and I am trying to create a reactjs app, and I follow the steps on react web, and it shows error. My node version is v8.11.1.npx version is 9.7.1.
btw I can create the app with npx create-react-app, but when fail with npm.
MacBook-teddy$ npm install -g create-react-app
create-react-app amber_Web
npm ERR! code E404
npm ERR! 404 Not Found: amber_Web#latest
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/teddy/.npm/_logs/2018-06-07T02_08_37_384Z-debug.log
And this is the log file:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'create-react-app',
1 verbose cli 'create-react-app',
1 verbose cli 'amber_Web' ]
2 info using npm#5.6.0
3 info using node#v8.11.1
4 verbose npm-session 452b1b32f613b960
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/create-react-app 32ms (from cache)
8 silly pacote tag manifest for create-react-app#latest fetched in 52ms
9 http fetch GET 404 https://registry.npmjs.org/amber_Web 1545ms
10 silly fetchPackageMetaData error for amber_Web#latest 404 Not Found: amber_Web#latest
11 verbose stack Error: 404 Not Found: amber_Web#latest
11 verbose stack at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
11 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
11 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
11 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
11 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
11 verbose stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
11 verbose stack at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
11 verbose stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
11 verbose stack at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
11 verbose stack at runCallback (timers.js:794:20)
11 verbose stack at tryOnImmediate (timers.js:752:5)
11 verbose stack at processImmediate [as _immediateCallback] (timers.js:729:5)
12 verbose cwd /Users/teddy/Desktop
13 verbose Darwin 17.5.0
14 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "create-react-app" "create-react-app" "amber_Web"
15 verbose node v8.11.1
16 verbose npm v5.6.0
17 error code E404
18 error 404 Not Found: amber_Web#latest
19 verbose exit [ 1, true ]
Thanks.
Looks like you tried to run create-react-app while installing it.
Run npm install -g create-react-app although this should already be installed.
Then run create-react-app amber-web
EDIT:
The reason this error out was because you put npm install -g create-react-app
create-react-app amber_Web all in one command telling npm to install the create-react-app package twice and the amber_Web package but that package doesn't exist hence the 404 error.
* name can no longer contain capital letters
The error is because npm follows the application naming conventions, according to which it is not allowed to use upper case letters in the application names also.
Kindly try using create-react-app amber_web
To learn more kindly visit : npmjs docs
try:
npm doctor
npm ping
"npm doctor runs a set of checks to ensure that your npm installation has what it needs to manage your JavaScript packages."
I think there could be problem in both cash and aslo react installation, so you should try:
npm cache clean --force
Then
npm install -g create-react-app
After that see your installation right or not by this
create-react-app --version
If it works then everything is ok now, but if not then you should try to uninstall node.js and try to search all it's caching folder delete them and install as frash node.js then insall react js.
try this
npm cache clean --force
and then
create-react-app your_app_name
Nothing helped me except
npm install -g webpack
npm -g list
├── create-react-app#5.0.1
└── webpack#5.73.0
Just set the registry as-
npm config set registry http://registry.npmjs.org
And then run
npm install -g create-react-app
create the project
npx create-react-app your_app_name
Related
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 npm#6.14.6
3 info using node#v12.18.3
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
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.
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.
Failed at the start script and didn't run nothing, while running the following command:
npm start
The Error
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"webpack-dev-server": "3.2.1"
Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack-dev-server was detected higher up in the tree:
/home/akhilbatchu/node_modules/webpack-dev-server (version: 3.8.1)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "webpack-dev-server" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
6. Check if /home/akhilbatchu/node_modules/webpack-dev-server is outside your project directory.
For example, you might have accidentally installed something in your home folder.
7. Try running npm ls webpack-dev-server in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed webpack-dev-server.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appnamsse#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appnamsse#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/akhilbatchu/.npm/_logs/2019-11-14T06_22_13_747Z-debug.log
Here is the complete log about what happened:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/akhilbatchu/.nvm/versions/node/v12.13.0/bin/node',
1 verbose cli '/home/akhilbatchu/.nvm/versions/node/v12.13.0/bin/npm',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.12.0
3 info using node#v12.13.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle appnamsse#0.1.0~prestart: appnamsse#0.1.0
6 info lifecycle appnamsse#0.1.0~start: appnamsse#0.1.0
7 verbose lifecycle appnamsse#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle appnamsse#0.1.0~start: PATH: /home/akhilbatchu/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/akhilbatchu/appnamsse/node_modules/.bin:/home/akhilbatchu/.nvm/versions/node/v12.13.0/bin:/home/akhilbatchu/anaconda3/bin:/home/akhilbatchu/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
9 verbose lifecycle appnamsse#0.1.0~start: CWD: /home/akhilbatchu/appnamsse
10 silly lifecycle appnamsse#0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle appnamsse#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle appnamsse#0.1.0~start: Failed to exec start script
13 verbose stack Error: appnamsse#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/akhilbatchu/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:210:5)
13 verbose stack at ChildProcess.<anonymous> (/home/akhilbatchu/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:210:5)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid appnamsse#0.1.0
15 verbose cwd /home/akhilbatchu/appnamsse
16 verbose Linux 4.15.0-64-generic
17 verbose argv "/home/akhilbatchu/.nvm/versions/node/v12.13.0/bin/node" "/home/akhilbatchu/.nvm/versions/node/v12.13.0/bin/npm" "start"
18 verbose node v12.13.0
19 verbose npm v6.12.0
20 error code ELIFECYCLE
21 error errno 1
22 error appnamsse#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the appnamsse#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Versions:
Node: v12.13.0
NPM: v6.12.0
Environment
react: "^16.11.0",
react-dom: "^16.11.0",
react-scripts: "3.2.0"
Could anyone please help me as I am not able to figure out what is going wrong and completely new to react.
Thank you.
Have you installed the dependencies .
npm install
If it doesn't work delete the node_modules folder from project. then
npm install
npm start
Did you read the first error message?
It says (step 6) you have (accidentally, probably) installed a copy of webpack-dev-server into your home directory
/home/akhilbatchu/node_modules/webpack-dev-server
Get rid of that copy (for instance, rename /home/akhilbatchu/node_modules into /home/akhilbatchu/node_modules_unused if you don't want to outright remove it), then try again.
I did followed this steps to work
npm install -g npm#latest it'll update npm, in case your modules are not updated
rm -rf node_modules
Delete node_modules in your project folder. as mentioned in the log
npm install
Run npm install or yarn, depending on the package manager you use. as it is mentioned in the console
I have a little problem when installing angular/cli on my computer. I´ve installed latest stable version of Node.js (currently v. 10.16.0 with npm 6.9.0). Installation finished successfully without any problem.
After installation I've tried to install angular/cli in command prompt and I get this error.
npm ERR! code E400
npm ERR! 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\h053z9rc\AppData\Roaming\npm-cache\_logs\2019-07-09T05_03_06_062Z-debug.log
and in the log file are these informations
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 '-g',
1 verbose cli '#angular/cli' ]
2 info using npm#6.9.0
3 info using node#v10.16.0
4 verbose npm-session 336717238679caae
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 400 https://registry.npmjs.org/#angular%2fcli 141ms
8 silly fetchPackageMetaData error for #angular/cli#latest 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 177ms
11 verbose stack Error: 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
11 verbose stack at res.buffer.catch.then.body (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:104:15)
11 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
12 verbose statusCode 400
13 verbose pkgid #angular/cli#latest
14 verbose cwd C:\Windows\System32
15 verbose Windows_NT 10.0.15063
16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "#angular/cli"
17 verbose node v10.16.0
18 verbose npm v6.9.0
19 error code E400
20 error 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
21 verbose exit [ 1, true ]
I've tried to reinstall node.js but it didn't help.
Try the Below :
Option 1
Open Command prompt as admin
npm uninstall -g #angular/cli
npm cache clean
npm config set strict-ssl false
npm install -g #angular/cli
OR :
Option 2
Open Command prompt as admin
npm uninstall -g #angular/cli
npm cache clean
npm config set proxy="http://proxy.example.com:8080"
npm config set https-proxy="http://proxy.example.com:8080"
npm config set strict-ssl false
npm install -g #angular/cli
If you get the error reason: write EPROTO try,
npm config set proxy="http://proxy.example.com:8080"
npm config set https-proxy="http://proxy.example.com:8080"
Follow Option 2
If all the above fails try to install the latest stable version of node & npm.
Try using these commands sequentially.
npm uninstall -g #angular/cli
npm cache clean
npm install -g #angular/cli
I am new to ionic and i am still trying to install it. Everytime i write an ionic command like npm install -g ionic cordova i receive this error
npm ERR! Unexpected end of JSON input while parsing near '...de":"0.6.2","express"'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DwayneT\AppData\Roaming\npm-cache\_logs\2019-05-31T01_51_23_542Z-debug.log
'
this is my log file
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli
'C:\\Users\\DwayneT\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-
cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'ionic',
1 verbose cli 'cordova' ]
2 info using npm#6.9.0
3 info using node#v8.11.1
4 verbose npm-session bf0a16c3729a6897
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 http://registry.npmjs.org/cordova 1407ms (from cache)
8 silly fetchPackageMetaData error for cordova#latest Unexpected end of JSON
input while parsing near '...de":"0.6.2","express"'
9 http fetch GET 304 http://registry.npmjs.org/ionic 1418ms (from cache)
10 silly pacote tag manifest for ionic#latest fetched in 1452ms
11 timing stage:rollbackFailedOptional Completed in 1ms
12 timing stage:runTopLevelLifecycles Completed in 1466ms
13 verbose stack SyntaxError: Unexpected end of JSON input while parsing
near '...de":"0.6.2","express"'
13 verbose stack at JSON.parse (<anonymous>)
13 verbose stack at parseJson
(C:\Users\DwayneT\AppData\Roaming\npm\node_modules\npm\node_modules\json-
parse-better-errors\index.js:7:17)
13 verbose stack at consumeBody.call.then.buffer
(C:\Users\DwayneT\AppData\Roaming\npm\node_modules\npm\node_modules\node-
fetch-npm\src\body.js:96:50)
13 verbose stack at <anonymous>
13 verbose stack at process._tickCallback
(internal/process/next_tick.js:188:7)
14 verbose cwd C:\Users\DwayneT
15 verbose Windows_NT 10.0.18362
16 verbose argv "C:\\Program Files\\nodejs\\node.exe"
"C:\\Users\\DwayneT\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-
cli.js" "install" "-g" "ionic" "cordova"
17 verbose node v8.11.1
18 verbose npm v6.9.0
19 error Unexpected end of JSON input while parsing near
'...de":"0.6.2","express"'
20 verbose exit [ 1, true ]
I have tried many solutions including
npm cache clean --force
but nothing seems to work and i am now now. Kindly assist please. I am using node v 8
It is the problem with npm corrupt caches. You can clear it using npm itself.
I solved it with
npm cache clean --force
then update npm
npm i npm#latest -g
then normally use your npm install command
npm install
Try run npm cache clean --force then re-run your command, I hope this fix this issue for you.
Try cleaning the npm cache use the below command. This will clean your existing npm entries and start from the beginning. I think the one file may be corrupt during the installation that's why you are facing this issue.
npm cache clean
Then try
npm install ionic -g
I've faced the problem.
when you uninstalled node js or delete the npm global packages or install the node js in a new machine that error will have occurred.
Please install global npm packages after installing the npm install or npm i
For Example My Case I've uninstalled npm global package. When I installed npm install, an error occurred.
You should clear the npm cache files manually by going to
C:\Users[Username]\AppData\Roaming\npm-cache
change [user
I've resolved this issue in the following way:
npm cache clean --force
and
npm cache verify
then
npm i npm#latest -g
and finally, I was able to run
npm i
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 npm#5.6.0
3 info using node#v8.11.3
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 ]
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
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
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.
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'
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.
Try uninstalling the current version of npm and install the latest version using
npm install -g create-react-app
For me restarting my code editor did the job
You can try this command, which has worked for me:
npm config set strict-ssl false