安装npm软件包失败并显示404 [英] Installing npm package fails with 404
问题描述
使用命令提示符,我正在尝试安装角度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 install -g @angular/cli@latest
,它失败并显示以下错误:
and it fails with the error:
npm ERR!代码E404 npm ERR!找不到404:@ angular/cli @ latest npm ERR!可以在以下位置找到此运行的完整日志:
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.当我尝试安装打字稿或任何其他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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!