storybook
storybook copied to clipboard
Not campatible with nuxt 2 version
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
You need to use v4 as noted on README.md: https://github.com/nuxt-modules/storybook/tree/4.x
trying to follow the instructions myself and cannot seem to get it to work
@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",
Due to time constraints and the fact that nuxt v2 ends support soon, we will not actively maintain v4. We accept PRs through.