chore(ci): fix npm cache path for windows; remove the whole cache fol… #6660
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After I re-enabled the
npm lscheck in #6644 some windows tasks started flaking a lot during the install due to npm failing to cleanup some deps on install and then failing because those are erraneous (it's not a new thing, just the check was skipped before):I'm not exactly sure what's going on here, but internet seems to mention that EPERM on windows with npm usually is caused by cache being in a weird state and I noticed that our npm_config_cache is not set correctly on windows:
I fixed the path. Also changed a bit how we clean up the cache:
npm cache cleanis deprecated, you can pass the --force flag but I thought nuking the whole folder should be even better (and it gets rid of a warning being printed).Did a few manual patches and the task seems to be passing for me, hopefully this deals with the flake, worst case scenario it fixes the wrong npm cache path we have right now 🙂