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: catch statSync error #11907

Merged
merged 1 commit into from
Feb 2, 2023
Merged

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Feb 2, 2023

Description

It seems we should catch the error here.

fixes #11904

refs #11436
refs https://github.com/vitejs/vite/pull/11436/files#r1094496131

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added the p4-important Violate documented behavior or significantly improves performance (priority) label Feb 2, 2023
@sapphi-red
Copy link
Member Author

@MoustaphaDev @Artur- I'm not sure if this fixes your errors. May I ask you to test this PR?

@ArnaudBarre
Copy link
Member

What is the error there? Is this not already the goal of throwIfNoEntry?

@sapphi-red
Copy link
Member Author

sapphi-red commented Feb 2, 2023

It's seems #11904 is failing with ENAMETOOLONG and astro's one is failing with ERR_INVALID_ARG_VALUE.

@ArnaudBarre
Copy link
Member

Ok thanks. We need to revamp the resolution algorithm for v5. Having a lof of sys calls that result to errors can kill perf because node takes time to generate the stacktrace (not sure there is an optimisation for empty catch clause)

@Artur-
Copy link
Contributor

Artur- commented Feb 2, 2023

👍 Solves ENAMETOOLONG for me

@patak-dev patak-dev merged commit f80b9a2 into vitejs:main Feb 2, 2023
@patak-dev
Copy link
Member

Let's release 4.1.1 with this before announcing

@sapphi-red sapphi-red deleted the fix/catch-statsync-error branch February 2, 2023 13:34
futurGH pushed a commit to futurGH/vite that referenced this pull request Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-important Violate documented behavior or significantly improves performance (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vite 4.1.0 returns internal server error: ENAMETOOLONG instead of 404 for long paths
5 participants