【问题标题】:VSCode: yarn, but got error: incorrect data checkVSCode:纱线,但出现错误:数据检查不正确
【发布时间】:2021-12-03 10:45:39
【问题描述】:

我克隆了 vscode repo 并运行 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.

更新:

操作系统:MacOS Big Sur - 11.5.2(Apple M1 芯片)

节点版本:v14.18.1

纱线版本​​:1.22.10

【问题讨论】:

  • 你试过用yarn cache clean清除你的缓存
  • 是的,我试过yarn cache clean。但它不起作用。感谢您的即时回复。

标签: visual-studio-code yarnpkg


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

    我做什么: 移除nvm-version节点,在Node official download address.上安装Node-v14.18.1

    现在,一切都很完美。

    【讨论】:

      猜你喜欢
      • 2021-12-01
      • 1970-01-01
      • 2018-06-06
      • 2018-06-02
      • 2019-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-01
      相关资源
      最近更新 更多