Storybook: Missing title error in a MDX story file lacks path to that file

Created on 27 Jan 2020  路  3Comments  路  Source: storybookjs/storybook

Describe the bug
Missing title error in a MDX story breaks all other stories.

To Reproduce
Steps to reproduce the behavior:

  1. go to your project
  2. start storybook
  3. create an empty MDX story
  4. 馃敟

Expected behavior

I see two possible improvements:

  1. Preserve the path to the broken file to display it in the error message
  2. Contain the error and display it in a toast or in another way that doesn't break access to all other stories (by design)

Screenshots

image

docs bug mdx todo

Most helpful comment

That makes sense @hasparus. We can catch the error and re-throw a more user-friendly error in this case. Great call! 馃挴

All 3 comments

Is this specific to docs? All story errors result in this UI, and it's a design decision to force users to fix the errors before they can view the storybook.

Okay, so we can discard my point (2).
Totally correct design decision.

Still, the error could guide the user to the file that needs to be fixed.

I have "addon-docs", but I鈥檓 running storybook in dev mode. (no 鈥攄ocs flag).

That makes sense @hasparus. We can catch the error and re-throw a more user-friendly error in this case. Great call! 馃挴

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maraisr picture maraisr  路  119Comments

firaskrichi picture firaskrichi  路  61Comments

moimikey picture moimikey  路  67Comments

joeruello picture joeruello  路  79Comments

ilyaulyanov picture ilyaulyanov  路  100Comments