visual-studio-codeyarnpkg

VSCode: yarn, but got error: incorrect data check


I cloned vscode repo and running yarn to install deps. But got an error:

[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.

update:

OS: MacOS Big Sur - 11.5.2 (Apple M1 chips)

node version: v14.18.1

yarn version: 1.22.10


Solution

  • The reason is I installed node v14.18.1 by nvm. Because of M1 mac, nvm build node from source code for me. But the output has problem with yarn.

    What I do: Remove the nvm-version node and install Node-v14.18.1 on Node official download address.

    Now, everything is perfect.