Skip to content

Commit

Permalink
Core: Improve MDX of error in story index
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed May 25, 2023
1 parent e272cc2 commit 209b01e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/lib/core-server/src/utils/StoryIndexGenerator.ts
Original file line number Diff line number Diff line change
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 209b01e

Please sign in to comment.