Skip to content

Conversation

@gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Jan 24, 2025

After I re-enabled the npm ls check 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):

[2025/01/24 09:38:34.465] npm WARN cleanup Failed to remove some directories [
[2025/01/24 09:38:34.465] npm WARN cleanup   [
[2025/01/24 09:38:34.465] npm WARN cleanup     'Z:\\data\\mci\\da882451ded25a5d9be4a843af055dab\\src\\node_modules\\appdmg',
[2025/01/24 09:38:34.465] npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 

...

[2025/01/24 09:38:39.709] npm ERR! invalid: appdmg@ Z:\data\mci\da882451ded25a5d9be4a843af055dab\src\node_modules\appdmg

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:

[2025/01/24 09:31:28.402] cache = "Z:\\cygdrive\\z\\data\\mci\\da882451ded25a5d9be4a843af055dab\\src\\.deps\\.npm"

I fixed the path. Also changed a bit how we clean up the cache: npm cache clean is 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 🙂

@gribnoysup gribnoysup added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Jan 24, 2025
@gribnoysup gribnoysup force-pushed the change-no-cache-strategy-ci branch from 4931c32 to 58562e7 Compare January 24, 2025 17:14
@gribnoysup gribnoysup merged commit 148d6e0 into main Jan 27, 2025
32 checks passed
@gribnoysup gribnoysup deleted the change-no-cache-strategy-ci branch January 27, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants