Closed gjp1311 closed 6 years ago
To install the Angular CLI you will want to run...
npm install -g @angular/angular-cli
This is documented here: https://github.com/angular/angular-cli/blob/master/README.md#installation
If you're having an issue with that, please post the logs here.
Hello,
I have the same error ...
Still gives the same error :(
Hi.
You should set your npm registry to main repo if you changed it to another one:
npm set registry https://registry.npmjs.org/
Hi,
Thanks, but I already tried.
Im trying to follow these install instructions. https://angular.io/guide/quickstart But i also get a not found error..
npm install -g @angular/angular-cli npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "@angular/angular-cli" npm ERR! node v6.11.0 npm ERR! npm v3.10.10 npm ERR! code E404
npm ERR! 404 Not found : @angular/angular-cli npm ERR! 404 npm ERR! 404 '@angular/angular-cli' 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! Please include the following file with any support request: npm ERR! C:\Users\username\npm-debug.log
npm install -g @angular/cli also results in not found.
What's going on?
Same here...
It apparently works when im not on my employers network. They have some 'umbrella' DNS security shield thing set up. I tried using fiddler to see what was going on, but from what i recall i couldn't see anything obvious.
Thanks Moulde. I got off my employer VPN and I was able to install the CLI.
I have same error and i don't use VPN
Aleksandrs-Mini:~ aleksandr$ npm install -g @angular/cli npm ERR! code E404 npm ERR! 404 Not Found: @angular/cli@latest
npm ERR! A complete log of this run can be found in: npm ERR! /Users/aleksandr/.npm/_logs/2017-08-11T21_39_51_822Z-debug.log Aleksandrs-Mini:~ aleksandr$ npm install -g @angular/cli npm ERR! code E404 npm ERR! 404 Not Found: @angular/cli@latest
npm ERR! A complete log of this run can be found in: npm ERR! /Users/aleksandr/.npm/_logs/2017-08-11T21_40_36_671Z-debug.log
I am having the same issue. I first noticed there was something wrong when my ng commands stopped working.
TommyJackson85, do you publish npm packages? If so then check this: https://stackoverflow.com/questions/45644926/cant-install-angular-cli-on-mac-sierra
npm set registry https://registry.npmjs.org/
This works for me
Initially I tried with "npm set registry https://registry.npmjs.org" (without quotes) and it didnt work. Later I tried with npm set registry https://registry.npmjs.org/ and it worked. "/" MATTERS
]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 '@angular/cli' ] 2 info using npm@5.6.0 3 info using node@v8.9.4 4 verbose npm-session d214942c6f4c52e5 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 http fetch GET 404 https://registry.npmjs.org/@angular%2fcli 599ms 8 silly fetchPackageMetaData error for @angular/cli@latest 404 Not Found: @angular/cli@latest 9 verbose stack Error: 404 Not Found: @angular/cli@latest 9 verbose stack at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19) 9 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23) 9 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31) 9 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18) 9 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10) 9 verbose stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18) 9 verbose stack at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16) 9 verbose stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10) 9 verbose stack at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14) 9 verbose stack at runCallback (timers.js:789:20) 9 verbose stack at tryOnImmediate (timers.js:751:5) 9 verbose stack at processImmediate [as _immediateCallback] (timers.js:722:5) 10 verbose cwd /Users/matthewbrown/Documents/Programming/NodeJS/angular/my-app 11 verbose Darwin 17.3.0 12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@angular/cli" 13 verbose node v8.9.4 14 verbose npm v5.6.0 15 error code E404 16 error 404 Not Found: @angular/cli@latest 17 verbose exit [ 1, true ]
Any help would be greatly appreciated.
disregard it was my /.npmrc file.
Hi everyone,
I have installed nodeJs using node version manager (NVM). When I try to install angular using the command say - npm install -g @angular/cli it gives me following error.
I get stuck on this issue. Could anyone please help me out to fix this bug?
@kinjal-thaker-css
I have the same issue. If you can, try it with node version 6
➜ $ nvm use 8
Now using node v8.9.4 (npm v5.6.0)
➜ $ npm i -g @angular/cli
npm ERR! code E404
npm ERR! 404 Not Found: @angular/cli@latest
npm ERR! A complete log of this run can be found in:
npm ERR! /[...]/2018-01-09T11_02_06_930Z-debug.log
➜ $ nvm use 6
Now using node v6.12.1 (npm v3.10.10)
➜ $ npm i -g @angular/cli
[...] Works
I had same issue It is related to credentials written in npm config.
run this command to edit
It works
Thanks, @se-schwarz, @megafy
appreciated!
I tried both the options but now "npm install -g @angular/cli" command get stuck on to one of the package say "JSON-schema-tra.." without throwing any error.
don't know what is going wrong with this?
For 404 scenario, check your .npmrc file. If there are any authorizations configured ,try to either comment /remove them. Now run the command as suggested.
Thanks, @megafy
appreciated!
My PC is Windows7.
npm config delete proxy npm config delete https-proxy npm set registry http://registry.npmjs.org/ npm set prefix "C:\Users\user\AppData\Roaming\npm"
it work.
NVM uses ~/.nvm/.npmrc
instead of ~/.npmrc
.
npm set registry https://registry.npmjs.org/
adds its entry to ~/.npmrc
.
Moving the line registry=https://registry.npmjs.org/
to ~/.nvm/npmrc
made it work for me.
Temporarily removing _auth
from ~/.npmrc
fixed it also for me.
But why is this problem occurring in the first place?
Thanks Jasperras,
cp ~/.npmrc ~/.nvm/
Solved for me.
Closing as resolved.
A problem of proxy . I resolved. Actually this error come when u are working behind the proxy. its can be solve using some setting in config file. config file is .npmrc set the proxy ;-
http-proxy = "http://111.111.0.1:111" ;(Your Proxy:host)
https-proxy = "http://111.111.0.1:111"
strict-ssl = false ;This is mandatory because NPM check first ssl after then proxy
I got similar error 401 Unauthorized: @angular/cli@latest
as well when running npm i
after creating new project. After reading through similar posts, I decided to check my .npmrc
file and also npm account, which the latter for some reason has no token. After creating new one and updated the ref in .npmrc
, the problem is now gone.
Thanks, @megafy appreciated! My PC is Windows7.
npm config delete proxy npm config delete https-proxy npm set registry http://registry.npmjs.org/ npm set prefix "C:\Users\user\AppData\Roaming\npm"
it work.
This solved the problem to me. But I didn't need to run this last command, I mean the command bellow: npm set prefix "C:\Users\user\AppData\Roaming\npm"
Thx, @yutakachi
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Hello, I'm having trouble installing angular in my machine (Windows 7). I've already tried to install using @angular/cli ou angular-cli and it always gives the same error mentioned in the title.
npm ERR! code E404 npm ERR! 404 Not Found : angular-cli@latest
This is the log that was generated : 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 'angular-cli' ] 2 info using npm@5.0.3 3 info using node@v8.1.0 4 verbose config Skipping project config: C:\Users\gabriel.paixao/.npmrc. (matches userconfig) 5 verbose npm-session b7f4ec783d7755a0 6 silly install loadCurrentTree 7 silly install readLocalPackageData 8 http fetch GET 404 http://registry.npmjs.org/angular-cli 39ms 9 silly fetchPackageMetaData error for angular-cli@latest 404 Not Found: angular-cli@latest 10 verbose stack Error: 404 Not Found: angular-cli@latest 10 verbose stack at fetch.then.res (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:41:19) 10 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23) 10 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31) 10 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18) 10 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10) 10 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18) 10 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16) 10 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10) 10 verbose stack at Immediate.Async.drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14) 10 verbose stack at runCallback (timers.js:800:20) 10 verbose stack at tryOnImmediate (timers.js:762:5) 10 verbose stack at processImmediate [as _immediateCallback] (timers.js:733:5) 11 verbose cwd C:\Users\gabriel.paixao 12 verbose Windows_NT 6.1.7601 13 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "angular-cli" 14 verbose node v8.1.0 15 verbose npm v5.0.3 16 error code E404 17 error 404 Not Found: angular-cli@latest 18 verbose exit [ 1, true ]