gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

Yarn integrity errors breaking build

Open pun-ky opened this issue 6 years ago • 6 comments

On some dev machines, under totally strange circumstances this kicks builds using node-gradle/gradle-node-plugin :

https://github.com/yarnpkg/yarn/issues/7584

current workaround for this is to run sh gradlew yarn_cache_clean

maybe sth else could be done like upgrading default version of yarn (hopefully if it was fixed in the meantime) to prevent this issue occuring in case of using this plugin?

pun-ky avatar Nov 21 '19 07:11 pun-ky

just upgrade to default yarn version to 1.19.1 will be very appreciated

pun-ky avatar Nov 21 '19 07:11 pun-ky

Given that 1.19.1 is the current stable that should be fine

deepy avatar Nov 22 '19 08:11 deepy

I'm on 1.19.2 and this still happens.

robclancy avatar Dec 02 '19 18:12 robclancy

seems that yarn cache sometimes is reusable but need to be upgraded / migrated and looks like that that kind of migration may fail and end with integrity error. As I understand that, it's rather one timer and build just fails when some older version of yarn was launched before. and that cache need to be deleted. I am not sure if there will be any fix introduced that will remove a need for that cache deletion.

pun-ky avatar Dec 02 '19 20:12 pun-ky

I have to clean the cache every single time. Anything changes at all I need to do yarn cache clean and then yarn install -f --update-checksums. Super annoying.

robclancy avatar Dec 02 '19 20:12 robclancy

agree, so seems that this need to be addressed somehow / more elegantly

pun-ky avatar Dec 03 '19 08:12 pun-ky