storybookjs / storybook

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

[Bug]: SB 7 actions undefined with Vue 2.7 project #21810

Open reynard80 opened 1 year ago

reynard80 commented 1 year ago

Describe the bug

Vue warns with invalid handlers for the emits in a Vue component.

When navigating to the Primary Button.vue story, warnings are shown and the actions are not shown in th UI.

[Vue warn]: Invalid handler for event "update:active-step": got undefined

It seems to work in Vue3 though.

To Reproduce

Not working: https://github.com/reynard80/vite-vue2.7-sb

Working: https://github.com/reynard80/vite-vue3-sb

System

Environment Info:

  System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.4.1 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1413.0), Chromium (109.0.1518.78)
  npmPackages:
    @storybook/addon-essentials: ^7.0.0-rc.8 => 7.0.0-rc.8
    @storybook/addon-interactions: ^7.0.0-rc.8 => 7.0.0-rc.8
    @storybook/addon-links: ^7.0.0-rc.8 => 7.0.0-rc.8
    @storybook/blocks: ^7.0.0-rc.8 => 7.0.0-rc.8
    @storybook/testing-library: ^0.0.14-next.1 => 0.0.14-next.1
    @storybook/vue: ^7.0.0-rc.8 => 7.0.0-rc.8
    @storybook/vue-vite: ^7.0.0-rc.8 => 7.0.0-rc.8
  npmGlobalPackages:
    @storybook/cli: 6.5.16

Additional context

No response

chakAs3 commented 1 year ago

Hi @reynard80 i guess we talk on Discord, i will see what i can do for vue 2 for this case

reynard80 commented 1 year ago

That would be great. We have some Vue 2 project that won't be migrated to Vue 3 in the foreseeable future.

Hai-San commented 1 year ago

Same problem here