Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby): fix eperm when cache getting cleared #35154

Merged
merged 6 commits into from
Mar 22, 2022
Merged

Conversation

wardpeet
Copy link
Contributor

Description

Fixes EPERM when cache needs to be cleared. We used del and del uses gracefulFs but it's not good enough on windows as it doens't retry enough. fs-extra does a better job.

Related Issues

Fixes #35086

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 17, 2022
@wardpeet wardpeet added type: bug An issue or pull request relating to a bug in Gatsby and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 17, 2022
@@ -270,6 +269,7 @@ export async function initialize({
? lmdbCacheDirExists
: cacheJsonDirExists

const { globby: glob } = await import(`globby`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this not to be a static import?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ESM only, i'll add a comment
https://unpkg.com/[email protected]/package.json

marvinjude
marvinjude previously approved these changes Mar 18, 2022
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing 🤔

@wardpeet
Copy link
Contributor Author

I guess it's yarnl lock updates. I'll update it in different PR to figure it out

@wardpeet wardpeet merged commit 6684c60 into master Mar 22, 2022
@wardpeet wardpeet deleted the fix/eperm-cache branch March 22, 2022 11:54
pieh pushed a commit that referenced this pull request Mar 22, 2022
pieh pushed a commit that referenced this pull request Mar 22, 2022
@pieh
Copy link
Contributor

pieh commented Mar 22, 2022

Published in [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EPERM: operation not permitted
5 participants