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(nextjs): Prevent webpack 5 from crashing server #3642

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

AbhiPrasad
Copy link
Member

Unblocks #3636.

It seems that awaiting a flush() call is throwing errors in
Webpack 5. This crashes the server as the handler has already
sent a response at that point. This patch wraps the flush call
in a try, catch until we can figure out a better fix.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

It seems that awaiting a flush() call is throwing errors in
Webpack 5. This crashes the server as the handler has already
sent a response at that point. This patch wraps the flush call
in a try, catch until we can figure out a better fix.
@AbhiPrasad AbhiPrasad requested a review from HazAT June 2, 2021 16:27
@AbhiPrasad AbhiPrasad self-assigned this Jun 2, 2021
@AbhiPrasad AbhiPrasad requested a review from kamilogorek as a code owner June 2, 2021 16:27
@HazAT HazAT merged commit 6c1b4bd into master Jun 2, 2021
@HazAT HazAT deleted the abhi/next-js-flush branch June 2, 2021 16:29
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.83 KB (-0.01% 🔽)
@sentry/browser - Webpack 22.07 KB (0%)
@sentry/react - Webpack 22.11 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.23 KB (0%)

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.

2 participants