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

[Feature Request]: Rationalize index generation errors #20663

Closed
1 of 3 tasks
tmeasday opened this issue Jan 18, 2023 · 1 comment · Fixed by #21114
Closed
1 of 3 tasks

[Feature Request]: Rationalize index generation errors #20663

tmeasday opened this issue Jan 18, 2023 · 1 comment · Fixed by #21114

Comments

@tmeasday
Copy link
Member

tmeasday commented Jan 18, 2023

Scenarios

There are various times you could run into indexing problems:

  • When starting dev mode
  • When HMR-ing in dev mode
  • When building
  • When smoke testing dev mode.

In all cases, there are several distinct types of errors:

  • Syntax errors
  • Invalid CSF errors (e.g. no default export)
  • Duplicate errors (same story twice).

Desired Behaviour

  1. All errors should lead to the same behaviour
  2. All errors should be collected into a useful message (if there are >1 files/stories with problems)
  3. In dev mode (startup and HMR) it should:
    1. Log to the console
    2. Cause the /index.json route to 5xx and serve a useful error
    3. Cause the preview to redbox that error
    4. Cause the sidebar to show an error UI
    5. Resolve itself automatically (no user input) when the file is fixed and saved.
  4. In build mode (building and smoke testing) it should error and stop the build process, and print all the errors to the console.

#20663 (comment)

@tmeasday tmeasday self-assigned this Jan 18, 2023
@tmeasday tmeasday moved this to Required for RC in Core Team Projects Jan 18, 2023
@vanessayuenn vanessayuenn changed the title [Feature Request]: Rationalize index generation errors https://github.com/storybookjs/storybook/issues/19094 Jan 18, 2023
@vanessayuenn vanessayuenn changed the title https://github.com/storybookjs/storybook/issues/19094 [Feature Request]: Rationalize index generation errors Jan 18, 2023
@tmeasday tmeasday moved this from Required for RC to In Progress in Core Team Projects Feb 16, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Core Team Projects Feb 20, 2023
@shilman
Copy link
Member

shilman commented Feb 21, 2023

Ooh-la-la!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.52 containing PR #21112 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

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

Successfully merging a pull request may close this issue.

2 participants