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

cannot read property theme of undefined #228

Open
Harshmakadia opened this issue Mar 27, 2020 · 2 comments
Open

cannot read property theme of undefined #228

Harshmakadia opened this issue Mar 27, 2020 · 2 comments

Comments

@Harshmakadia
Copy link

Hi I'm trying to use the withDocs and withReadme But for some reasons it's given be this error.

Screenshot 2020-03-27 at 2 18 18 PM

I'm using the following version of "storybook-readme": "^5.0.8",

Here is my sample code

storiesOf('Avatar', module)
  .addDecorator(withKnobs)
  .addDecorator(withDocs(AvatarDocs))
  .addDecorator(withReadme(AvatarReadme))
  .add('Avatar Usage',() => (
    <AvatarStory
      img={text('img', 'https://greatindiantours.com/wp-content/themes/travel-log/images/dummy-user.jpg')}
      height={number('height', 60)}
      width={number('width', 60)}
      circle={boolean('circle', false)}
      altText={text('altText', 'User Icon')}
    />
  ))

As soon as I add .addDecorator(withDocs(AvatarDocs)) and
.addDecorator(withReadme(AvatarReadme)) It gives me above error.
Am I missing something?

@bbellmyers
Copy link

This is happening for me too. Seems related to upgrading storybook from 5 to 6 for me

@bbellmyers
Copy link

Solution: #221

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

No branches or pull requests

2 participants