Storybook: SVG sprites module fails while building static storybook

Created on 26 Oct 2020  路  2Comments  路  Source: nuxt-community/storybook

Version

@nuxtjs/storybook: v3.0.0
nuxt: v2.14.7

Steps to reproduce

Have a couple of svg's with the svg-sprite nuxt module and try and run yarn nuxt storybook build

What is Expected?

Storybook static folder should ouput and not fail while having svg-sprite module included.

What is actually happening?

Currently when running the command yarn nuxt storybook build and having svg-sprites module added, the static build fails with an error:

=> Failed to build the preview
 Module not found: Error: Can't resolve '~svgsprite/sprites.json' in '/Users/sananes/Projects/atlas-design-system/node_modules/@nuxtjs/svg-sprite/lib/pages'
(node:40014) UnhandledPromiseRejectionWarning: ModuleNotFoundError: Module not found: Error: Can't resolve '~svgsprite/sprites.json' in '/Users/sananes/Projects/atlas-design-system/node_modules/@nuxtjs/svg-sprite/lib/pages'    at /Users/sananes/Projects/atlas-design-system/node_modules/webpack/lib/Compilation.js:925:10
    at /Users/sananes/Projects/atlas-design-system/node_modules/webpack/lib/NormalModuleFactory.js:401:22
    at /Users/sananes/Projects/atlas-design-system/node_modules/webpack/lib/NormalModuleFactory.js:130:21
    at /Users/sananes/Projects/atlas-design-system/node_modules/webpack/lib/NormalModuleFactory.js:224:22
    at /Users/sananes/Projects/atlas-design-system/node_modules/neo-async/async.js:2830:7    at /Users/sananes/Projects/atlas-design-system/node_modules/neo-async/async.js:6877:13    at /Users/sananes/Projects/atlas-design-system/node_modules/webpack/lib/NormalModuleFactory.js:214:25    at /Users/sananes/Projects/atlas-design-system/node_modules/enhanced-resolve/lib/Resolver.js:
bug

Most helpful comment

Hey @Sananes,
It should be fixed in @nuxtjs/[email protected]

All 2 comments

Hey @Sananes,
It should be fixed in @nuxtjs/[email protected]

Thanks my man! Great job and really appreciate it! 鈾ワ笍

Was this page helpful?
0 / 5 - 0 ratings