storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.22k stars 9.26k forks source link

Vue.js: 'Error' props throw error #9254

Closed artemi5c closed 4 years ago

artemi5c commented 4 years ago

Hello there!

Describe the bug With vue.js, when a component is passed a string that contains 'error' as a prop, Storybook throws an error.

I upgraded to 5.2.8. Everything worked fine in 5.1.8

To Reproduce

Expected behavior Story displays correctly

Screenshots A good component: image

A broken component image

Error text: Cannot read property 'props' of undefined TypeError: Cannot read property 'props' of undefined at extractPropsFromVNodeData (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:134336:34) at createComponent (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:135291:19) at _createElement (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:135480:15) at createElement (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:135417:10) at vm._c (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:135549:42) at Proxy.render (http://localhost:9001/main.7e6579a8ea482918e7d7.bundle.js:8173:7) at VueComponent.Vue._render (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:135603:22) at VueComponent.updateComponent (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:136121:21) at Watcher.get (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:136534:25) at new Watcher (http://localhost:9001/vendors~main.7e6579a8ea482918e7d7.bundle.js:136523:12)

System: Environment Info:

System: OS: macOS Mojave 10.14.6 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Binaries: Node: 10.5.0 - ~/.nvm/versions/node/v10.5.0/bin/node npm: 6.1.0 - ~/.nvm/versions/node/v10.5.0/bin/npm Browsers: Chrome: 76.0.3809.132 Firefox: 71.0 Safari: 13.0.3 npmPackages: @storybook/addon-a11y: ^5.0.3 => 5.1.9 @storybook/addon-cssresources: ^5.0.11 => 5.1.9 @storybook/addon-knobs: ^5.1.8 => 5.1.9 @storybook/addon-notes: ^5.1.8 => 5.1.9 @storybook/addon-viewport: ^5.1.8 => 5.1.9 @storybook/theming: ^5.1.8 => 5.1.9 @storybook/vue: ^5.2.8 => 5.2.8

Additional context Every string containing 'error' doesn't work for me.

Thanks for your time :)

artemi5c commented 4 years ago

After a thorough investigation, the issue is on our side. Sorry for the inconvenience.

Happy Holidays!

miguelleite commented 3 years ago

@artemi5c can you give some detail on what was wrong on your side? I'm facing the same issue and having trouble figuring it out 🙏