使用命令提示符,我尝试安装 Angular CLI,但失败了。我有 npm 版本 5.5.1 和 Node 版本 v8.9.1。我正在尝试使用命令安装 Angular cli
npm install -g @angular/cli@latest
它失败并出现错误:
npm ERR! code E404 npm ERR! 404 Not Found: @angular/cli@latest npm ERR! A complete log of this run can be found in:
我查看日志文件,发现它试图从不存在的位置获取包。不确定它是从哪里拉出来的。如何修复此位置路径并安装 Angular cli。当我尝试安装 typescript 或任何其他 npm 包时,也会发生同样的情况。他们都尝试从下面提到的位置安装,但失败并显示 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
关于node.js - 安装 npm 包失败并出现 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47520181/