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

Output stack traces for Webpack errors during build #25037

Closed
dandv opened this issue Jun 17, 2020 · 3 comments
Closed

Output stack traces for Webpack errors during build #25037

dandv opened this issue Jun 17, 2020 · 3 comments
Assignees
Labels
topic: webpack/babel Webpack or babel type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.

Comments

@dandv
Copy link
Contributor

dandv commented Jun 17, 2020

Summary

During gatsby build, errors encountered while rendering React components are shown as WebpackError: ..., without a useful stack trace. Would it be possible to add a stack trace through the React component tree, or at least the line number of where the error occurred?

Basic example

Open the code sandbox and wait for the build to run into the error. The output will look like the following:

image

Motivation

This would enable tracking errors that occur in React components during SSR.

An alternative would be documentation about how to step through React components during SSR, added to https://gatsby.dev/html-builds or perhaps to https://www.gatsbyjs.org/docs/debugging-the-build-process/.

@dandv dandv added the type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement. label Jun 17, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 17, 2020
@vladar vladar added status: inkteam assigned topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 17, 2020
@abraaoz
Copy link

abraaoz commented Jul 7, 2020

up

@LekoArts
Copy link
Contributor

LekoArts commented Jul 8, 2020

#25385 should have fixed this. If you're still seeing this behavior please post a reproduction in this issue: #25507

@LekoArts LekoArts closed this as completed Jul 8, 2020
@dandv
Copy link
Contributor Author

dandv commented Jul 17, 2020

Confirming the fix in v2.24.3. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.
Projects
None yet
Development

No branches or pull requests

5 participants