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/#638 #837

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Fix/#638 #837

merged 3 commits into from
Sep 6, 2024

Conversation

agcty
Copy link
Contributor

@agcty agcty commented Sep 4, 2024

Fixes #638 and #690 by "gracefully" handling errors in getBuild()

might make sense to do this for serverBuild too but it seems to work without

Explanation

When an import error occurs, the express server, for whatever reason, seems to crash unrecoverably.

You can check this by running sudo lsof -i -P -n | grep LISTEN after an import error has occurred, the server should not be running on your chosen port anymore.

I am not sure why before this PR the error is not caught though and displayed correctly because express has a default error handler that should prevent this from happening. In any case, this PR fixes this issue whatever the underlying reason might be.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Oh nice! Thanks!

@kentcdodds kentcdodds merged commit e632246 into epicweb-dev:main Sep 6, 2024
5 checks passed
@natac13 natac13 mentioned this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR breaks on invalid imports/syntax errors
2 participants