gpt4 book ai didi

node.js - npm 安装卡在 "normalizeTree: http request GET https://registry.npmjs.o"

转载 作者:太空宇宙 更新时间:2023-11-03 22:09:45 40 4
gpt4 key购买 nike

所以几个小时以来,我尝试安装 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

最佳答案

很可能是代理问题!

不要忘记使用以下命令配置 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/

关于node.js - npm 安装卡在 "normalizeTree: http request GET https://registry.npmjs.o",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45943078/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com