问题描述
使用命令提示符,我尝试安装 angular CLI 但它失败了.我有 npm 版本 5.5.1 和节点版本 v8.9.1.我正在尝试使用命令
Using the command prompt, I am trying to install angular CLI and it fails. I have npm version 5.5.1 and node version v8.9.1. I am trying to install angular cli using the command
npm install -g @angular/cli@latest
它失败并出现错误:
npm 错误!代码 E404npm 错误!404 未找到:@angular/cli@latestnpm 错误!可以在以下位置找到此运行的完整日志:
我查看了日志文件,发现它试图从不存在的位置获取包.不知道从哪里拉出来的.如何修复此位置路径并安装 angular cli.当我尝试安装 typescript 或任何其他 npm 包时,也会发生同样的情况.他们都尝试从下面提到的位置安装,但失败并显示 404
I look at the log file and I see its trying to fetch the package from a location that doesn't exist. Not sure from where it gets pulled. How do I fix this location path and install angular cli. Same happens when I try to install typescript or any other npm package. all of them try to install from the location mentioned below and it fails with 404
8 http fetch GET 404
http://nuget.feed.xyz.corp:8729/npm/FeedNPM/@angular%2fcli 109ms
9 silly fetchPackageMetaData error for @angular/cli@latest 404 Not Found:
@angular/cli@latest
10 verbose stack Error: 404 Not Found: @angular/cli@latest
推荐答案
npm config set registry http://registry.npmjs.org
这篇关于安装 npm 包失败并显示 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!