storybook icon indicating copy to clipboard operation
storybook copied to clipboard

Not campatible with nuxt 2 version

Open mukhrr opened this issue 2 years ago • 3 comments

Storybook Module isn't running when installing it as described in the docs.

And npx storybook-nuxt init leads to error:

  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn yarn',
  path: 'yarn',
  spawnargs: [ 'install' ]
}

but still .storybook directory with preview.ts and main.ts is created. But I have to create stories directory manually.

I have these in nuxt.config.js:

  buildModules: [
    "@nuxt/typescript-build",
    "@nuxtjs/composition-api/module",
    "@nuxtjs/storybook",
    ["@pinia/nuxt", { disableVuex: false }]
  ],

  storybook: {
    // Options
    url: "http://localhost:6006",
    port: 6006
  },

When I prompt yarn dev it warns with following:

Module @storybook-vue/nuxt-storybook is disabled due to incompatibility issues:                                                                          4:33:48 PM  
 - [nuxt] Nuxt version ^3.0.0 is required but currently using 2.16.3

mukhrr avatar Nov 09 '23 11:11 mukhrr

You need to use v4 as noted on README.md: https://github.com/nuxt-modules/storybook/tree/4.x

hacknug avatar Nov 16 '23 15:11 hacknug

trying to follow the instructions myself and cannot seem to get it to work

javag97 avatar Feb 09 '24 18:02 javag97

@javag97 have you tried adding @storybook/core to your deps? Make sure to pin it to the following version:

"@nuxtjs/storybook": "4.3.2",
"@storybook/addon-a11y": "6.5.16", // probably not required
"@storybook/core": "6.5.16",

hacknug avatar Feb 15 '24 09:02 hacknug

Due to time constraints and the fact that nuxt v2 ends support soon, we will not actively maintain v4. We accept PRs through.

tobiasdiez avatar Apr 18 '24 11:04 tobiasdiez