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

feat(cli): catch build errors with cli:buildError hook #6475

Merged
merged 1 commit into from Sep 29, 2019

Conversation

pimlie
Copy link

@pimlie pimlie commented Sep 28, 2019

refactor: errors during initiating/listening nuxt are non-recoverable thus should be fatal. Also some errors during the build are non-recoverable but not sure if thats some or all, so dont make those fatal for now

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

When you were developing your app and eg added a plugin but made a typo, then the re-build of Nuxt would fail but the loading screen would not reflect that. The build error was only visible on the console, which can be confusing if you are not used to looking at the console for errors.

This pr changes that (together with nuxt/loading-screen#45) to capture build errors in dev mode and print a stracktrace of them on the loading screen.

image

Description

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

refactor: errors during initiating/listening nuxt are non-recoverable thus should be fatal. Also some errors during the build are non-recoverable but not sure if thats really some or all, so dont make those fatal for now
@pimlie pimlie requested a review from a team September 28, 2019 10:47
@codecov-io
Copy link

codecov-io commented Sep 28, 2019

Codecov Report

Merging #6475 into dev will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##              dev   #6475      +/-   ##
=========================================
+ Coverage   95.65%   95.7%   +0.04%     
=========================================
  Files          79      79              
  Lines        2692    2698       +6     
  Branches      696     696              
=========================================
+ Hits         2575    2582       +7     
+ Misses        101     100       -1     
  Partials       16      16
Flag Coverage Δ
#e2e 100% <ø> (ø) ⬆️
#fixtures 50.59% <0%> (-0.12%) ⬇️
#unit 92.4% <100%> (+0.05%) ⬆️
Impacted Files Coverage Δ
packages/cli/src/commands/dev.js 87.87% <100%> (+2.69%) ⬆️
packages/vue-renderer/src/renderer.js 94.3% <0%> (+0.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 686720f...33cd484. Read the comment docs.

@pimlie pimlie changed the title feat: show build errors in dev on loading screen feat(cli): show build errors in dev on loading screen Sep 28, 2019
@pi0 pi0 changed the title feat(cli): show build errors in dev on loading screen feat(cli): catch build errors with cli:buildError hook Sep 29, 2019
@pi0 pi0 merged commit 27e0353 into nuxt:dev Sep 29, 2019
@pimlie pimlie deleted the feat-show-dev-build-errors-on-loading-screen branch September 29, 2019 09:35
@Atinux
Copy link
Member

Atinux commented Sep 30, 2019

YES, thank you @pimlie <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants