svg-sprite
svg-sprite copied to clipboard
Storybook error after installing svg-sprite
Hi all,
After installing svg-sprite in a project, I wanted to add @nuxtjs/storybook. Got this error:
ERROR in ./generated-stories-entry.js
Module not found: Error: Can't resolve './.nuxt-storybook/storybook/@nuxtjs/svg-sprite/stories' in '/Users/...
Anyone got this error already and knows how to deal with it?
We ran into this as well -- happens when upgrading to the latest nuxt/storybook. I ended up just disabling the integration in my nuxt config:
storybook: {
modules: {
// with upgraded storybook, svg-sprite is crashing the storybook build.
// It's not clear why that is, because it should have been fixed in
// svg-sprite 0.5.1: https://github.com/nuxt-community/storybook/issues/155
// That doesn't seem to have worked, however.
exclude: ["svg-sprite"],
},
},
As a temporary solution, you can specify the path to the sprite yourself and exclude library from modules.
stories: [
'./node_modules/@nuxtjs/svg-sprite/stories/**/*.stories.js',
],