我在尝试使用 Yarn 安装软件包时遇到错误。运行
yarn install
时,进程失败并出现以下错误:
error Error: https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz: Request failed "304 Not Modified"
环境:
完整错误输出:
[2/4] 🚚 Fetching packages...
error Error: https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz: Request failed "304 Not Modified"
at ResponseError.ExtendableBuiltin (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:696:66)
at new ResponseError (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:802:124)
at Request.<anonymous> (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:66750:16)
at Request.emit (node:events:513:28)
at module.exports.Request.onRequestResponse (/opt/homebrew/Cellar/yarn/1.22.22/libexec/lib/cli.js:142287:10)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:710:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:552:22)
at TLSSocket.emit (node:events:513:28)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
我尝试过的:
如何解决此安装错误并成功安装我的依赖项?
我也开始收到错误,但针对不同的模块
Error: https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz: Request failed "304 Not Modified"
错误错误:https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz:请求失败“304未修改”