繁体   English   中英

使用npm安装Angular CLI时进行ECONNRESET

[英]ECONNRESET while installing Angular CLI with npm

尝试在没有代理集和互联网完美无缺的机器上安装Angular CLI时,出现以下错误:

4727 silly extract micromatch@^3.1.4 extracted to C:\Users\User\AppData
\Roaming\npm\node_modules\.staging\micromatch-7d604bf4 (38763ms)
4728 timing action:extract Completed in 265532ms
4729 verbose unlock done using C:\Users\User\AppData\Roaming\npm-cache\_locks\staging-eb8de851d6fef93d.lock for C:\Users\User\AppData\Roaming\npm\node_modules\.staging
4730 timing stage:rollbackFailedOptional Completed in 0ms
4731 timing stage:runTopLevelLifecycles Completed in 277531ms
4732 verbose type system
4733 verbose stack FetchError: request to https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz failed, reason: read ECONNRESET
4733 verbose stack     at ClientRequest.req.on.err 
[...]
4739 error code ECONNRESET
4740 error errno ECONNRESET
4741 error network request to https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz failed, reason: read ECONNRESET
4742 error network This is a problem related to network connectivity.
4742 error network In most cases you are behind a proxy or have bad network settings.
4742 error network
4742 error network If you are behind a proxy, please make sure that the
4742 error network 'proxy' config is set properly.  See: 'npm help config'
4743 verbose exit [ 1, true ]

通常无法提取rxjs包。 到目前为止,我已经尝试过:

  • 将注册表设置为http://版本,但是每次使用is-number软件包时,它都会更早失败
  • 重新安装和更新npm / node
  • 每次操作后清除缓存
  • 禁用Windows防火墙
  • 以管理员权限启动命令行
  • 检查代理配置是否为空

似乎没有任何作用。 你有什么想法?

编辑:也许这会有所帮助,但是当我尝试更新npm本身时,它将立即挂在rollbackFailedOptional上,仅在将注册表更改为http://版本后,它才设法进行自我更新

降级到更稳定的node / npm版本。 要安装npm的特定版本,例如5.6.0

npm install -g npm@5.6.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM