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

Latest alpha version is less resilient to import errors #2390

Closed
jugglingcats opened this issue Mar 9, 2020 · 1 comment · Fixed by #2437
Closed

Latest alpha version is less resilient to import errors #2390

jugglingcats opened this issue Mar 9, 2020 · 1 comment · Fixed by #2437
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers

Comments

@jugglingcats
Copy link

🐛 Bug Report

In version 44 a failed import reports an error but docusaurus continues to run and reload changes. In 48 the server terminates and has to be restarted after the error is fixed. This is quite inconvenient during the development/documentation cycle.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Note that the example project below is using Lerna. This is just to make the repro easier -- our actual project doesn't use Lerna but exhibits the same behaviour.

  1. Download / clone https://github.com/jugglingcats/docusaurus-repro
  2. lerna bootstrap
  3. cd docusaurus-site
  4. npm start
  5. Notice that the server starts, albeit with an error
Starting the development server...

× Client
  Compiled with some errors in 8.43s

i 「wds」: Project is running at http://localhost:3001/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from D:\alfie\tmp\docusaurus-repro\packages\docusaurus-site
i 「wds」: 404s will fallback to /index.html


./docs/mdx.md
Module not found: Can't resolve '@theme/invalid' in 'D:\alfie\tmp\docusaurus-repro\packages\docusaurus-site\docs'
  1. Kill the server
  2. Edit package.json to upgrade to version 48. Re-run lerna bootstrap
  3. Try to start docusaurus

Expected behavior

Docusaurus should start and report the import error.

Actual Behavior

Docusaurus reports the error and terminates.

Starting the development server...

* Client █████████████████████████ after emitting (98%)


i 「wds」: Project is running at http://localhost:3000/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from D:\alfie\tmp\docusaurus-repro\packages\docusaurus-site
i 「wds」: 404s will fallback to /index.html
Client bundle compiled with errors therefore further build is impossible.

Your Environment

  • Docusaurus version used: 2.0.0-alpha.48
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0):
  • Operating system and version (desktop or mobile):

Reproducible Demo

https://github.com/jugglingcats/docusaurus-repro

See above for detailed steps.

@jugglingcats jugglingcats added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Mar 9, 2020
@lex111 lex111 added this to the v2.0.0-alpha.49 milestone Mar 11, 2020
@jugglingcats
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers
Projects
None yet
2 participants