angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.76k stars 11.98k forks source link

ERR! 404 Not Found : angular-cli@latest #6669

Closed gjp1311 closed 6 years ago

gjp1311 commented 7 years ago

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 ]

Brocco commented 7 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.

cissok commented 7 years ago

Hello,

I have the same error ...

screen
gjp1311 commented 7 years ago

Still gives the same error :( angularprint

ismailarilik commented 7 years ago

Hi.

You should set your npm registry to main repo if you changed it to another one:

npm set registry https://registry.npmjs.org/
cissok commented 7 years ago

Hi,

Thanks, but I already tried.

Moulde commented 7 years ago

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?

Somebi commented 7 years ago

Same here...

Moulde commented 7 years ago

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.

garylam commented 7 years ago

Thanks Moulde. I got off my employer VPN and I was able to install the CLI.

kondaurovDev commented 7 years ago

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

TommyJackson85 commented 7 years ago

I am having the same issue. I first noticed there was something wrong when my ng commands stopped working.

kondaurovDev commented 7 years ago

TommyJackson85, do you publish npm packages? If so then check this: https://stackoverflow.com/questions/45644926/cant-install-angular-cli-on-mac-sierra

hades217 commented 6 years ago

npm set registry https://registry.npmjs.org/

This works for me

suhas777 commented 6 years ago

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

mabr0wn commented 6 years ago

]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.

mabr0wn commented 6 years ago

disregard it was my /.npmrc file.

kinjal-thaker-css commented 6 years ago

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.


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@5.6.0 3 info using node@v8.9.4 4 verbose npm-session d677a1e1475c648f 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 silly fetchPackageMetaData error for @angular/cli@latest request to https://registry.npmjs.org/@angular%2fcli failed, reason: connect ETIMEDOUT 74.122.238.10:8080 8 verbose type system 9 verbose stack FetchError: request to https://registry.npmjs.org/@angular%2fcli failed, reason: connect ETIMEDOUT 74.122.238.10:8080 9 verbose stack at ClientRequest.req.on.err (C:\Users\ADMIN\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:68:14) 9 verbose stack at emitOne (events.js:116:13) 9 verbose stack at ClientRequest.emit (events.js:211:7) 9 verbose stack at onerror (C:\Users\ADMIN\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-base\index.js:106:9) 9 verbose stack at callbackError (C:\Users\ADMIN\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-base\index.js:126:5) 9 verbose stack at 9 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7) 10 verbose cwd C:\Windows\system32 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" "-g" "@angular/cli" 13 verbose node v8.9.4 14 verbose npm v5.6.0 15 error code ETIMEDOUT 16 error errno ETIMEDOUT 17 error network request to https://registry.npmjs.org/@angular%2fcli failed, reason: connect ETIMEDOUT 74.122.238.10:8080 18 error network This is a problem related to network connectivity. 18 error network In most cases you are behind a proxy or have bad network settings. 18 error network 18 error network If you are behind a proxy, please make sure that the 18 error network 'proxy' config is set properly. See: 'npm help config' 19 verbose exit [ 1, true ]

I get stuck on this issue. Could anyone please help me out to fix this bug?

se-schwarz commented 6 years ago

@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
MegaFy commented 6 years ago

I had same issue It is related to credentials written in npm config.

run this command to edit

It works

kinjal-thaker-css commented 6 years ago

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?

sai-prakash commented 6 years ago

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.

MahiPoul commented 6 years ago

screenshot 88

yutakachi commented 6 years ago

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.

Jasperras commented 6 years ago

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.

tuukkamustonen commented 6 years ago

Temporarily removing _auth from ~/.npmrc fixed it also for me.

But why is this problem occurring in the first place?

wdavilaneto commented 6 years ago

Thanks Jasperras, cp ~/.npmrc ~/.nvm/ Solved for me.

clydin commented 6 years ago

Closing as resolved.

dubeysunny74 commented 6 years ago

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 
ashrafaa commented 5 years ago

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.

leorotondano commented 5 years ago

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

angular-automatic-lock-bot[bot] commented 5 years ago

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.