storybook icon indicating copy to clipboard operation
storybook copied to clipboard

Errors since you add more than one story ('_createElementVNode' has already been declared)

Open JNietou opened this issue 2 years ago • 4 comments

If I add one more component to the equation, the storybook breaks. With the following error: image

image

Reproduction (don't forget to stop the console and npm run storybook): nuxt3 simplest example

I would also like to know how I can run my app independently in dev mode via npm run dev without the storybook also opening. Right now if you run npm run dev, both open. And I don't always need to open storybook.

JNietou avatar Nov 13 '23 13:11 JNietou

@JNietou This bug may have been fixed by @storybook-vue/nuxt 0.2.0

If you want to start nuxt in dev mode without storybook, you may try to add a condition for when to add the storybook module to modules in nuxt.config.[ts|js] (you could look for an env variable that you define, as an example).

filiphazardous avatar Dec 04 '23 09:12 filiphazardous

@filiphazardous I'll try it, thanks. In any case, in my opinion, I think that storybook should have a command independent of npm run dev.

JNietou avatar Dec 04 '23 12:12 JNietou

@JNietou In the second case, that may very well be so. I'm just a fellow user who stumbled across your bug, since I have been having a similar problem. And when I could come up with a way to solve your second use-case, I figured I might as well tell you about it.

A suggestion is to file that as a separate feature request. That way, it'll be easier for the maintainer to see, and for us fellow users to support it.

filiphazardous avatar Dec 04 '23 15:12 filiphazardous

Is still an issue? Could you please update the reproduction in this case to use the newest versions. Thanks!

Having storybook dev server independent of nuxt dev server is https://github.com/nuxt-modules/storybook/issues/555.

tobiasdiez avatar May 02 '24 04:05 tobiasdiez

Closing this issue due to inactivity :zzz: Please reopen the issue with additional information if the problem persists.

tobiasdiez avatar Aug 11 '24 20:08 tobiasdiez