when creating new angular project - package install failed - node.js

Error while creating a new project using angular cli .it shows
3492 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/error-ex
3492 verbose stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:104:15
3492 verbose stack at runMicrotasks (<anonymous>)
3492 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
3493 verbose statusCode 404
3494 verbose pkgid error-ex#^1.3.1
3495 verbose cwd C:\Users\amemni\Angular\test\testt
3496 verbose Windows_NT 10.0.17134
3497 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--quiet"
3498 verbose node v12.13.0
3499 verbose npm v6.12.0
3500 error code E404
3501 error 404 Not Found - GET https://registry.npmjs.org/error-ex
3502 error 404
3503 error 404 'error-ex#^1.3.1' is not in the npm registry.
3504 error 404 You should bug the author to publish it (or use the name yourself!)
3505 error 404 It was specified as a dependency of 'parse-json'
3506 error 404 Note that you can also install from a
3507 error 404 tarball, folder, http url, or git url.
3508 verbose exit [ 1, true ]
i've tried :
1 -npm clear cache --force and manually deleted the npm cache folder
2- upgrade and change angular cli version
3- change the registry with : npm config set registry http://registry.npmjs.org
None of them worked
Angular CLI: 9.0.1
Node: 12.13.0
OS: win32 ia32
Windows 10

See this issue
npm install fails with 'error-ex#^1.3.1' is not in the npm registry
There is currently a missing NPM package repository (404) - so all npms dependent on that package are broken. It's being tracked in that thread and for those of us affected, we'll update that thread as well.

Set the registry to this and , install the dependency globally. Then re-do the creation of new app.
npm config set registry http://registry.npm.taobao.org
npm install -g error-ex#1.3.1
ng new my-new-app
source :https://github.com/Qix-/node-error-ex/issues/13

Related

React JS: Having issue with CREATE_REACT_APP when using npx command in VS Code

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.

Installing angular/cli crashes with error 404

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

npm ERR! Unexpected end of JSON input while parsing near '...registry.npmjs.org/#i'

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

npm install reactjs app npm ERR! code E404

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

Npm install doesn't work on Windows 10

i have an issue with nodejs. I'm trying to install ember.js library through the command line. When i launch "npm install" command this log appear:
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' ]
2 info using npm#2.11.3
3 info using node#v0.12.7
4 verbose config Skipping project config: C:\Users\Antonio/.npmrc. (matches userconfig)
5 verbose readDependencies loading dependencies from C:\Users\Antonio\package.json
6 error install Couldn't read dependencies
7 verbose stack Error: ENOENT, open 'C:\Users\Antonio\package.json'
7 verbose stack at Error (native)
8 verbose cwd C:\Users\Antonio
9 error Windows_NT 6.3.9600
10 error argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
11 error node v0.12.7
12 error npm v2.11.3
13 error path C:\Users\Antonio\package.json
14 error code ENOPACKAGEJSON
15 error errno -4058
16 error package.json ENOENT, open 'C:\Users\Antonio\package.json'
16 error package.json This is most likely not a problem with npm itself.
16 error package.json npm can't find a package.json file in your current directory.
17 verbose exit [ -4058, true ]
I've visited NPM Troubleshooting but i can't found the solution (i tried the three options but nothing happen).
Just to say: there is yet a folder named "npm" in AppData/Roaming.
The correct way to install ember is:
npm install -g ember-cli
ember new my-app
npm install by itself only works if you have a package.json in the directory where you type it.
I had this same issue trying to install some node modules to a fresh installation of Sails. I found the solution in this link: https://github.com/npm/npm/issues/9676
Just removed node_modules from my root and then npm install again, then I was able to install other modules as well.

Resources