atanasster / storybook-addon-deps

A storybook addon to add a dependencies tree exporer tab.
https://atanasster.github.io/storybook-addon-deps/?path=/docs/design-system-avatarlist--short
MIT License
60 stars 3 forks source link

No dependencies found for this component in Vue.JS application #1

Closed spietrek closed 4 years ago

spietrek commented 4 years ago

I followed the Vue.JS example. Note: I did not install the Docs add-on. Using the default Welcome story which is built on a new Vue.JS application, I received some warnings on setup about not having component defined. I added the component to the CSF export default method and the page loaded without the warnings on the page. When I navigate to the page, I receive the following message:

welcome Dependencies No dependencies found for this component

In the console are 3 warnings:

  1. Warning: Failed prop type: Invalid prop viewMode of value deps supplied to <<anonymous>>, expected one of ["story","info","docs","settings"].
  2. Warning: Failed prop type: Invalid prop viewMode of value deps supplied to Layout, expected one of ["story","info","docs","settings"].
  3. Warning: Failed prop type: Invalid prop viewMode of value deps supplied to Preview, expected one of ["story","info","docs","settings"].

I tried some of my other components with the same message of "No dependencies found for this component". Do I need to install the Docs add-on? The documentation had it as optional.

atanasster commented 4 years ago

Thank you very much for the update. The console warnings are expected, dont worry about those.

As for the dependencies not found - most probably its a component name mismatch. What is the component name that you see at the top of the Dependencies page?

In the storybook Vue example, i had to change the name to match ‘Button’ everywhere

  1. In config.js https://github.com/atanasster/storybook-addon-deps/blob/4c07e442e3e7162a301331c325a9759dc766b958/examples/vue/.storybook/config.js#L8

2 in the story itself https://github.com/atanasster/storybook-addon-deps/blob/4c07e442e3e7162a301331c325a9759dc766b958/examples/vue/src/stories/components/button.stories.js#L5

atanasster commented 4 years ago

Hi, version 1 was released and now the setup is much easier with presets.

I will close this issue for now