Published 02 May, 2022

React - Npm install reactjs app npm ERR! code E404

Category ReactJS
Modified : Nov 30, 2022

React is a free and open source Javascript library that helps us build interactive user interfaces. It is well suitable for building SPAs (Single Page Applications) and the best thing is that its components are reusable.

3

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: [email protected]

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 [email protected]
3 info using [email protected]
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 [email protected] fetched in 52ms
9 http fetch GET 404 https://registry.npmjs.org/amber_Web 1545ms
10 silly fetchPackageMetaData error for [email protected] 404 Not Found: [email protected]
11 verbose stack Error: 404 Not Found: [email protected]
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: [email protected]
19 verbose exit [ 1, true ]

Thanks.

Answers

There are 4 suggested solutions here and each one has been listed below with a detailed description. The following topics have been covered briefly such as Node.js, Reactjs, Npm. These have been categorized in sections for a clear and precise explanation.

32

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


43

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


39

try this

npm cache clean --force

and then

create-react-app your_app_name

34

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.