Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: avoid clean up while committing deps folder #12722

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

patak-dev
Copy link
Member

Description

Reported error in Discord by @bluwy:

Error: ENOENT: no such file or directory, open '/Users/bjorn/Work/repros/vite-scss-slow/node_modules/.vite/deps_temp_f7b967e0/_metadata.json'
    at Object.openSync (node:fs:590:3)
    at Object.writeFileSync (node:fs:2202:35)
    at Object.commit (file:///Users/bjorn/Work/repros/vite-scss-slow/node_modules/.pnpm/vite@4.3.0-beta.1_sass@1.49.7/node_modules/vite/dist/node/chunks/dep-f365bad6.js:44771:18)

This cancel() could be called after the result is committed.

I added a guard to avoid this issue but also refactored the optimizer code, so the cancel wouldn't be called after this PR.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@stackblitz
Copy link

stackblitz bot commented Apr 3, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patak-dev patak-dev added the p3-minor-bug An edge case that only affects very specific usage (priority) label Apr 3, 2023
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

I can't seem to repro the old error before, but running this locally a few times seems to work fine too 👍 Nice refactor.

@patak-dev patak-dev merged commit 3f4d109 into main Apr 3, 2023
@patak-dev patak-dev deleted the fix/avoid-clean-up-while-committing-deps-folder branch April 3, 2023 15:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants