Closed danechitoaie closed 5 years ago
The code at
https://github.com/yarnpkg/yarn/compare/1.18-stable...v1.19.0#diff-7246848d5d10d9c48ef4be28cb961582R24
(https://github.com/yarnpkg/yarn/blob/master/src/package-fetcher.js#L24) is trhowing an error if the cacheRemote.integrity
property isn't there, but I think it should just move forward if it's not found.
Or as @danechitoaie asked, is there a way to have yarn generate the cacheRemote integrity values for these packages that are missing it?
I just ran into this today too. No idea how to fix it.
I've tried:
yarn cache clean
rm -rf $(yarn cache dir)
yarn install --no-cache
yarn install --no-cache --network-concurrency 1
In case anyone was wondering how to rollback to yarn@1.17.3
with homebrew, as it isn't well documented:
brew unlink yarn
brew install https://raw.githubusercontent.com/dotiful/homebrew-core/2815d3ce3ea17202979f062bbcae78c96ebc0723/Formula/yarn.rb
brew switch yarn 1.17.3
I just ran into this today too. No idea how to fix it.
I've tried:
yarn cache clean rm -rf $(yarn cache dir) yarn install --no-cache yarn install --no-cache --network-concurrency 1
Also tried all of the above - and for some projects it works. Then, because we use Yarn on a shared instance that runs multiple installs with Yarn on a global level, the cache runs into a repository that has no property with the 'integrity' value and it fails. The fix should be either to:
You can follow the steps in https://github.com/yarnpkg/yarn/issues/7584#issuecomment-536437423:
The solution is to first enable the migration by adding the following in
~/.yarnrc
:unsafe-disable-integrity-migration false
Then cleaning the cache and reinstalling:
yarn cache clean yarn install -f
There is a partial fix in the latest nightly build of yarn but there are still lingering issues so I'd follow #7584 for further updates.
Closing to keep a single thread 🙂 : https://github.com/yarnpkg/yarn/issues/7584#issuecomment-536437423
Since upgrading to Yarn v1.19.0 we started getting the following error on
yarn install
phase:We have lots of repos, each with their own package.json and respective yarn.lock file and I've noticed (checking the yarn cache folder) that we have three different versions of
browserslist
being used:For some reason
npm-browserslist-4.6.6-6e4bf467cde520bc9dbdf3747dafa03531cec453
does not have theintegrity
field in its.yarn-metadata.json
file which I guess causes yarn to fail when checking the cache integrity.Here's also the
.yarn-metadata.json
contents:Any idea who's generating these integrity fields and when, and why the two versions of this package (
npm-browserslist-4.6.3-0530cbc6ab0c1f3fc8c819c72377ba55cf647f05
andnpm-browserslist-4.7.0-9ee89225ffc07db03409f2fee524dc8227458a17
) have it while the middle version (npm-browserslist-4.6.6-6e4bf467cde520bc9dbdf3747dafa03531cec453
) does not?This made all of our Jenkins builds to fail since the 1.19.0 update. To get it working we had to revert to 1.18.0.