【发布时间】:2022-01-02 16:12:53
【问题描述】:
我正在使用带有 zsh 终端的 Mac,并且我的机器上有节点 v16.13.1。 我正在尝试安装软件包,但没有成功。无论我尝试安装什么软件包,我都会收到以下错误。我也尝试过先使用 npm -init 进行初始化,但仍然得到相同的结果。
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/figlet failed, reason: Client network socket disconnected before secure TLS connection was established
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/edgaracuna/.npm/_logs/2022-01-02T16_01_32_283Z-debug.log
如何解决这个问题才能安装节点包?
【问题讨论】:
-
您通常可以从他们的仓库中获取它们;它只是文件。当 npm 关闭时,npm 将关闭。 (你也可以检查你的网络设置,或者只是等待,或者设置一个本地 npm 进行缓存——这对 new 依赖项没有帮助。)
-
请编辑问题以将其限制为具有足够详细信息的特定问题,以确定适当的答案。
标签: node.js npm-install