storybook: vue storybook install fails
The example yields
Failed to execute 'createElement' on 'Document': The tag name provided ('<my-button :rounded="true">story as a function template</my-button>') is not a valid name.
Error: Failed to execute 'createElement' on 'Document': The tag name provided ('<my-button :rounded="true">story as a function template</my-button>') is not a valid name.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 15 (9 by maintainers)
Commits related to this issue
- Merge pull request #4285 from yaodingyd/patch-1 fix #2384: support string-only component for vue — committed to storybookjs/storybook by igor-dv 6 years ago
- update adding story as a template regarding https://github.com/storybooks/storybook/issues/2384 — committed to jordanwink201/storybook by jordanwink201 6 years ago
Got the same error,
From the example:
If I comment out the first story ‘story as a template’, and only use my components like the second story ‘story as a component’, it works. (I did register my component globally in .storybook/config.js)
Is stories as template really supported for vue components?
And if I change the first one to:
The error is gone, but globally registered components are not detected, so will get:
I also got my working per @andreasvirkus’s approach
I THINK it should be as simple as replacing: https://github.com/storybooks/storybook/blob/master/app/vue/src/client/preview/render.js#L78-L80
with:
I was the person reporting the same issue on Discord (Oct 20th) and what worked for me eventually was switching from this:
To this: