I was trying to install the dependencies of an existing project using:
yarn install
All of a sudden I saw this error in terminal:
...
[2/4] Fetching packages...
error Incorrect integrity when fetching from the cache
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
The solution to this problem is to do a cache cleaning. Just run following command from the same position:
yarn cache clean
After running above command, we can proceed with yarn install
or yarn add
commands. It should work fine.