Skip to content

Commit

Permalink
Merge pull request #22782 from storybookjs/shilman/22619-improve-mdx-…
Browse files Browse the repository at this point in the history
…of-error

Core: Improve MDX of error in story index
  • Loading branch information
shilman committed Jun 8, 2023
2 parents adf5051 + 209b01e commit ec24911
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/lib/core-server/src/utils/StoryIndexGenerator.ts
Expand Up @@ -353,11 +353,12 @@ export class StoryIndexGenerator {

if (!csfEntry)
throw new Error(
dedent`Could not find CSF file at path "${result.of}" referenced by \`of={}\` in docs file "${relativePath}".
dedent`Could not find or load CSF file at path "${result.of}" referenced by \`of={}\` in docs file "${relativePath}".
- Does that file exist?
- If so, is it a CSF file (\`.stories.*\`)?
- If so, is it matched by the \`stories\` glob in \`main.js\`?`
- If so, is it matched by the \`stories\` glob in \`main.js\`?
- If so, has the file successfully loaded in Storybook and are its stories visible?`
);
}

Expand Down

0 comments on commit ec24911

Please sign in to comment.