-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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(build): avoid logging an object on compilation errors #15885
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 8b4f8ee. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hello @BlackHole1 really appreciate the assist here, could you show us the error occurring somewhere perhaps? |
yes, the project uses monorepo. |
I think the true reason we're logging this stat is because of this: (we are throwing here with the stats storybook/lib/builder-webpack4/src/index.ts Line 149 in 89830ad
and then this: (we are awaiting these 2 promises (the preview is throwing) storybook/lib/core-server/src/build-static.ts Line 146 in 89830ad
and then finally the thrown stats object is caught here, and logged as an error: storybook/lib/core-server/src/build-static.ts Line 173 in 89830ad
I think we should throw with a generic error instead here: storybook/lib/builder-webpack4/src/index.ts Line 149 in 89830ad
return fail(new Error('compiler encountered errors builder the preview')); @BlackHole1 could you adjust the PR? storybook/lib/builder-webpack5/src/index.ts Lines 137 to 140 in 89830ad
and also for the manager builders: storybook/lib/manager-webpack5/src/index.ts Line 164 in 89830ad
storybook/lib/manager-webpack4/src/index.ts Line 166 in 89830ad
|
@ndelangen Great! I will be making adjustments later today. |
@yannbf this seems relevant for our changes we were making today |
# Conflicts: # lib/core-server/src/build-static.ts
When building with webpack, all information from stats will be printed when an error occurs.
In my project, stats will print out over 5,000 lines, which is hard to swallow..