npm install卡在“normalizeTree:http request GET https://registry.npmjs.o”

时间:2017-08-29 15:32:03

标签: node.js angular npm

所以几个小时,我正在尝试安装angular cli - 但是npm包只是不起作用。 我已禁用防火墙,甚至看到一些关于更改路径变量的帖子 - 没有任何作用。

任何想法?

日志如下,我试图运行“npm -verbose install -g @ angular / cli --loglevel = silly”

npm sill install loadCurrentTree
npm sill install readGlobalPackageData
npm sill fetchPackageMetaData @angular/cli
npm sill fetchNamedPackageData @angular/cli
npm sill mapToRegistry name @angular/cli
npm sill mapToRegistry scope (from package name) @angular
npm verb mapToRegistry no registry URL found in name for scope @angular
npm sill mapToRegistry using default registry
npm sill mapToRegistry registry https://registry.npmjs.org/
npm sill mapToRegistry data Result {
npm sill mapToRegistry   raw: '@angular/cli',
npm sill mapToRegistry   scope: '@angular',
npm sill mapToRegistry   escapedName: '@angular%2fcli',
npm sill mapToRegistry   name: '@angular/cli',
npm sill mapToRegistry   rawSpec: '',
npm sill mapToRegistry   spec: 'latest',
npm sill mapToRegistry   type: 'tag' }
npm sill mapToRegistry uri https://registry.npmjs.org/@angular%2fcli
npm verb request uri https://registry.npmjs.org/@angular%2fcli
npm verb request no auth needed
npm info attempt registry request try #1 at 6:52:04 AM
npm verb request id 8d89f8490dc17414
npm http request GET https://registry.npmjs.org/@angular%2fcli
[..................] - normalizeTree: http request GET https://registry.npmjs.o

1 个答案:

答案 0 :(得分:1)

最有可能是代理问题!

请勿忘记使用以下命令配置NPM(以及任何其他包管理器,如Yarn):

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

来源:https://jjasonclark.com/how-to-setup-node-behind-web-proxy/