【问题标题】:Error when performing the request while installing yarn安装纱线时执行请求时出错
【发布时间】:2022-01-04 14:36:17
【问题描述】:

当我尝试安装 yarn 时,我得到以下输出:

Internal Error: Error when performing the request
    at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\corepack\dist\corepack.js:3937:20)
    at ClientRequest.emit (node:events:390:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) 

【问题讨论】:

  • 我遇到了同样的问题,yarn set version stable 没有解决它。但是“安装”可能不是这个步骤的正确描述,也许“初始化”是一个更好的词?你是如何安装纱线的?我按照纱线网站上的说明使用了 corepack。在现有存储库中运行 yarn 以及在空文件夹中运行 yarn init -2 时都会发生此错误。这是在新计算机上的全新设置。

标签: reactjs yarnpkg


【解决方案1】:

作为工作计算机初始设置的一部分,我遇到了同样的错误。即使是干净运行的纱线(yarn init -2 在空文件夹中)也会导致错误。

关闭我的 VPN 后,纱线按预期工作。

谷歌搜索错误将我带到这个页面,这让我怀疑 VPN。 https://github.com/nodejs/corepack/issues/67

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,对我来说,通过运行 yarn set version stable 解决了。

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2019-09-14
    • 2018-08-28
    • 1970-01-01
    • 2020-10-19
    • 2018-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多