VSCode: yarn, but got error: incorrect data check

VSCode: yarn, but got error: incorrect data check

我克隆了 vscode 存储库和 运行 yarn 来安装 deps。但是出现错误:

[1/4]   Resolving packages...
[2/4]   Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.3.0.tgz: incorrect data check".
info If you think this is a bug, please open a bug report with the information provided in "/Users/lsf/Code/github/js/vscode/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

更新:

OS: MacOS Big Sur - 11.5.2(Apple M1 芯片)

节点版本:v14.18.1

纱线版本:1.22.10

https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.3.0.tgz 存在压缩问题。该文件不是正确的 Zlib 压缩流,因此无法打开。

原因是我通过 nvm 安装了 node v14.18.1。由于 M1 mac,nvm 从源代码为我构建节点。但是输出有问题 yarn.

我的工作: 删除 nvm-version 节点并在 Node official download address.

上安装 Node-v14.18.1

现在,一切都完美了。