Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook error after installing svg-sprite #265

Open
iuliard opened this issue Mar 15, 2022 · 2 comments
Open

Storybook error after installing svg-sprite #265

iuliard opened this issue Mar 15, 2022 · 2 comments

Comments

@iuliard
Copy link

iuliard commented Mar 15, 2022

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?

@bmulholland
Copy link

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"],
      },
    },

@webistomin
Copy link

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',
 ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants