storybookjs / storybook

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

【Vuetify】TypeError: Cannot read property 'styles' of undefined #18884

Open codthing opened 2 years ago

codthing commented 2 years ago

Describe the bug

yarn storybook report an error:

ModuleBuildError: Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot read property 'styles' of undefined

To Reproduce

https://github.com/codthing-bug/vuetify-sb-setupbug.git

System

Environment Info:

  System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz
  Binaries:
    Node: 14.18.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (104.0.1293.47)
  npmPackages:
    @storybook/addon-actions: ^6.5.10 => 6.5.10
    @storybook/addon-essentials: ^6.5.10 => 6.5.10
    @storybook/addon-interactions: ^6.5.10 => 6.5.10
    @storybook/addon-links: ^6.5.10 => 6.5.10
    @storybook/builder-webpack5: ^6.5.10 => 6.5.10
    @storybook/manager-webpack5: ^6.5.10 => 6.5.10
    @storybook/testing-library: ^0.0.13 => 0.0.13
    @storybook/vue: ^6.5.10 => 6.5.10

Additional context

fazulk commented 2 years ago

Also experiencing this on 6.5.10 with vue2, works fine in 6.5.9. Not using vuetify in this repo.

This was a problem with vue-loader dependency mismatch for me.

I needed to add this to my package.json (using vue2)

 "resolutions": {
    "vue-loader": "^15.10.0"
  }
codthing commented 2 years ago

~Also experiencing this on 6.5.10 with vue2, works fine in 6.5.9. Not using vuetify in this repo.~

This was a problem with vue-loader dependency mismatch for me.

I needed to add this to my package.json (using vue2)

 "resolutions": {
    "vue-loader": "^15.10.0"
  }

@fazulk I will try, thx fazulk