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

Vue - addon-docs does not work with render functions #9745

Closed
mattgreenfield opened this issue Feb 4, 2020 · 4 comments
Closed

Vue - addon-docs does not work with render functions #9745

mattgreenfield opened this issue Feb 4, 2020 · 4 comments

Comments

@mattgreenfield
Copy link

Describe the bug
When adding addon-docs to a Vue component with a render function (and no ) I get the following error:
[vue-docgen-loader] failed to parse the component file with docgen-api: Cannot read property 'leadingComments' of null

The 'Docs' tab loads in the browser and shows the component in the iframe but does not show the component description and prop info.

Removing the render function and adding a fixes this.

To Reproduce
Steps to reproduce the behavior:

  1. Add addon-docs to a Vue project
  2. Add a story for a component with a render function
  3. See error

Expected behavior
This should work just like any other component.
If that's not possible, maybe the warning could be better? "addon-docs does not support components with a render function"

Screenshots
Screenshot 2020-02-04 at 11 32 15

System:
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7600 CPU @ 3.50GHz
Binaries:
Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
npm: 6.13.7 - ~/Documents/ui-baseplate/node_modules/.bin/npm
Browsers:
Chrome: 79.0.3945.130
Firefox: 71.0
Safari: 13.0.5
npmPackages:
@storybook/addon-actions: ^5.3.7 => 5.3.10
@storybook/addon-backgrounds: ^5.3.7 => 5.3.10
@storybook/addon-docs: ^5.3.10 => 5.3.10
@storybook/addon-knobs: ^5.3.7 => 5.3.10
@storybook/addon-links: ^5.3.7 => 5.3.10
@storybook/addon-notes: ^5.3.7 => 5.3.10
@storybook/addon-storysource: ^5.3.7 => 5.3.10
@storybook/addon-viewport: ^5.3.7 => 5.3.10
@storybook/addons: ^5.3.7 => 5.3.10
@storybook/source-loader: ^5.3.7 => 5.3.10
@storybook/vue: ^5.3.7 => 5.3.10

@shilman
Copy link
Member

shilman commented Feb 4, 2020

@Aaron-Pool is this anything you know about?

@Aaron-Pool
Copy link
Contributor

@shilman no, I'm fairly confident render functions are known to be working. At least the typical use case. @mattgreenfield any chance you could set up a minimal repro repo for debugging purposes?

@mattgreenfield
Copy link
Author

Thanks for your time and help.

I've created a reduced test case and narrowed down the error a little (it's not render functions that's the problem).

I've opened a new issue here #9821

@mattgreenfield
Copy link
Author

I've managed to reproduce this one and have raised an issue with vue-docgen here vue-styleguidist/vue-styleguidist#753

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

No branches or pull requests

3 participants