当前位置: 首页 > 工具软件 > corepack > 使用案例 >

yarn Internal Error at ClientRequest corepack.js 报错

全飞扬
2023-12-01

从npm换成yarn,按文档走,

corepack enable
yarn init -2

然后就一直报错

Internal Error: Error when performing the request
    at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\corepack\dist\corepack.js:16064:20)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:494:9)
    at TLSSocket.emit (node:events:513: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)

corepack disable

不知道为什么,只能执行命令先关闭.,然后用这个文档来安装 https://yarn.bootcss.com/docs/install#windows-stable

npm install --global yarn

yarn --version

也可以参考https://juejin.cn/post/7135343424193953829

 类似资料: