storybookjs/storybook

[Bug]: Error: Couldn't find story matching 'about'.

Open

#22,474 建立於 2023年5月9日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)TypeScript (89,909 star) (10,058 fork)batch import
bugcorehelp wantedsev:S4

描述

Describe the bug

If you are on one of the /settings/ pages and reload, this error is displayed in the console:

Error: Couldn't find story matching 'about'.
- Are you sure a story with that id exists?
- Please check your stories field of your main.js config.
- Also check the browser console and terminal for error messages.
    at PreviewWeb.selectSpecifiedStory (runtime.js:89:63)
    at Object.nextFn (runtime.js:85:5556)
    at runtime.js:4:78253
    at Array.forEach (<anonymous>)
    at SynchronousPromise4._runResolutions (runtime.js:4:78194)
    at SynchronousPromise4.then (runtime.js:4:75736)
    at PreviewWeb.initializeWithStoryIndex (runtime.js:85:5445)
    at runtime.js:80:606

The page is still loaded so this is not a blocker.

To Reproduce

  1. Open https://githubda5akq-h1s0--6006--9c984a48.local-credentialless.webcontainer.io/?path=/settings/about
  2. Open dev tools
  3. Refresh the page
  4. See the error

The related project: https://stackblitz.com/edit/github-da5akq

System

No response

Additional context

I think the error comes from here: https://github.com/storybookjs/storybook/blob/506c050f417a43daa992a6bc7405ecf8659cfdef/code/lib/preview-api/src/modules/preview-web/PreviewWithSelection.tsx#L152-L160

貢獻者指南