ui icon indicating copy to clipboard operation
ui copied to clipboard

Library is not compatible with storybook

Open Codeus3262 opened this issue 2 years ago • 17 comments

Version

@nuxthq/ui: v2.4.0 nuxt: v3.6.1 storybook: v7.0.24

Steps to reproduce

  1. Install the component library
  2. Install Storybook along with the Nuxt plugin for Storybook
  3. Attempt to utilize the components from the library
  4. Notice missing styles
  5. Observe that dependencies such as NuxtLink, which are imported from the UI library, are not found (Note: NuxtLink works as expected when used within a standard component)

What is Expected?

The UI Library should seamlessly integrate with Storybook, allowing developers to extend and build custom applications effectively.

What is actually happening?

An error is encountered while trying to install the UI library into Storybook.

Codeus3262 avatar Jun 30 '23 15:06 Codeus3262

Could you please provide a reproduction?

benjamincanac avatar Jul 05 '23 12:07 benjamincanac

I can confirm too that the library does not work with storybook..

zola33dsf avatar Aug 11 '23 15:08 zola33dsf

It would be helpful to know what is your issue with Storybook, are you using https://github.com/storybook-vue/storybook-nuxt or https://github.com/nuxt-modules/storybook?

benjamincanac avatar Sep 14 '23 15:09 benjamincanac

@benjamincanac I'm using this library : https://github.com/storybook-vue/storybook-nuxt I've posted an issue today

zola33dsf avatar Sep 14 '23 15:09 zola33dsf

Same here using https://storybook.nuxtjs.org/

SilasNiewierra avatar Sep 22 '23 09:09 SilasNiewierra

The @nuxtjs/storybook module is a Nuxt 2 module, it is not compatible with Nuxt 3. I guess you should use https://github.com/storybook-vue/storybook-nuxt but its quite new.

benjamincanac avatar Sep 22 '23 09:09 benjamincanac

will be really nice if we take the time and solve this issue of storybook and @nuxt/ui and @nuxt/ui-pro

for the moment none of the storybook modules is working with @nuxt/ui*

TiBianMod avatar Nov 23 '23 02:11 TiBianMod

Yet no one has provided a reproduction or an actual error of what is not working exactly.

benjamincanac avatar Nov 23 '23 10:11 benjamincanac

I will prepare later a reproduction repo

TiBianMod avatar Nov 23 '23 10:11 TiBianMod

@benjamincanac I have prepared the reproduction repo for you to test

Please read the Readme

TiBianMod avatar Nov 23 '23 16:11 TiBianMod

@benjamincanac we have any news, from where the issue is coming?

TiBianMod avatar Nov 29 '23 11:11 TiBianMod

This is indeed not working at all, there are errors about:

  • At least one <template> or <script> is required in a single file component. on nuxt-icon/dist/runtime/IconCSS.vue
  • NuxtLink not being defined in the Link component
  • A default value needs to be a function when your type is an object or array on every component with class and ui props defaulting to undefined (thrown by vue-docgen-plugin)

Are we sure this module is done?

benjamincanac avatar Nov 29 '23 13:11 benjamincanac

after testing and testing again, the issue is coming from nuxt-icon module

if we going to install nuxt-icon module without nuxt-ui, we going to see exactly the same errors.

I added a branch for nuxt-icon, if you want you can give it a try

export default defineNuxtConfig({
    devtools: { enabled: true },
    modules: ["@nuxtjs/storybook", "nuxt-icon"],
});

to determine if the nuxt-ui components working with storybook, the nuxt-icon needs first to be fixed!!

issue related to storybook and nuxt-icon: https://github.com/nuxt-modules/icon/issues/77

TiBianMod avatar Nov 29 '23 15:11 TiBianMod

Did anybody find a workaround to use NuxtUI with Storybook?

itslewin avatar Dec 03 '23 21:12 itslewin

Any updates? I still can't use it with storybook..

zola33dsf avatar Jan 23 '24 14:01 zola33dsf

I'm still experiencing this issue as well

memtech3 avatar Feb 23 '24 21:02 memtech3

any chance someone able to get this working now? there's been updates with storybook and nuxtui but none of it seem to have fix this issue?

alexanderringor avatar May 16 '24 01:05 alexanderringor

Still having this issue

cain avatar May 29 '24 01:05 cain

I might move off of nuxtui for this reason 😢

ishimweemmy avatar Jan 12 '25 06:01 ishimweemmy