question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

addon-docs: Failed prop type: Invalid prop `viewMode` of value `docs` supplied to `Preview`, expected one of ["story","info"].

See original GitHub issue

Describe the bug When using addon-docs with MDX, my component in the Canvas tab is shown, but nothing in the Docs tab shows.

To Reproduce Configure the new Storybook beta with docs-addon while adding those presets :

module.exports = [
  {
    name: "@storybook/addon-docs/react/preset",
    options: {
      configureJSX: true,
      sourceLoaderOptions: null,
    },
  },
];

Versions :

Screenshots

Story base.story.mdx :

Screenshot 2019-09-04 at 15 31 54

Config config.js :

Screenshot 2019-09-04 at 15 33 41

My component shows well in the Canvas tab, however, when I go to the Docs tab, I am having the following errors :

Screenshot 2019-09-04 at 15 35 03

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Sep 5, 2019

@lonyele Yeah those routes were hard-coded in 5.0 due to lack of time. And I think they are hard-coded again in 5.2. But we expect our users to use the same version of our libraries, and don’t make guarantees if they are not. This is not pure semver, but practically speaking it’s worked for us so far aside from this kind of case (e.g. people mixing 5.1 & 5.2 together), which unfortunately happens fairly often.

0reactions
alisonsayarathcommented, Sep 11, 2019

@alisonsayarath why did you need to fork it? that will def cause problems. docs should be stable release in the next two weeks.

Oups, sorry for the late answer. We have multiple CRA base config modes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docs Addon | Storybook: Frontend workshop for UI development
DocsPage is a zero-config aggregation of your component stories, text descriptions, docgen comments, props tables, and code examples into clean, readable pages.
Read more >
How to connect props with Storybook controls - YouTube
Need to learn about Storybook controls in a hurry?Storybook controls make your documentation come to life with auto-generated, ...
Read more >
argTypes mapping doesn't work with Vue props #14420
then the Storybook throws in console Invalid prop: type check failed for prop "propToPass". Expected Object, got String with value "prop1". Labels work...
Read more >
Storybook - An alternative approach - Paul Scanlon
"canvas" = A single page to display a single story and the addons panel; "docs" = A single page to display multiple stories,...
Read more >
Setup CSF + MDX stories with @storybook/addon-docs - GitLab
Over the last few months, Storybook has introduced several new features to make it easier to write rich docs pages for stories:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found