Skip to content

Can't run in storybook #80

Description

@maximryabov22011988

Hello! I ran into a problem when starting a storybook with a Сheckbox src/components/base/Checkbox component that uses external-svg-sprite-loader.

Storybook webpack config - ./.storybook/main.js

I get in the console:

`
info => Using base config because react-scripts is not installed.
74% optimizing SvgStorePluginF:\Projects\webpack-broker\node_modules\external-svg-sprite-loader\lib\SvgStorePlugin.js:113
throw error;
^

TypeError: Cannot read property 'replace' of null
at SvgDocument.toSymbol (F:\Projects\webpack-broker\node_modules\external-svg-sprite-loader\lib\SvgDocument.js:158:36)
at SvgSprite.generate (F:\Projects\webpack-broker\node_modules\external-svg-sprite-loader\lib\SvgSprite.js:114:48)
at SvgStorePlugin.generateSprites (F:\Projects\webpack-broker\node_modules\external-svg-sprite-loader\lib\SvgStorePlugin.js:108:24)
at SyncHook.eval [as call] (eval at create (F:\Projects\webpack-broker\node_modules\tapable\lib\HookCodeFactory.js:19:10), :12:1)
at SyncHook.lazyCompileHook (F:\Projects\webpack-broker\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.seal (F:\Projects\webpack-broker\node_modules\webpack\lib\Compilation.js:1322:23)
at compilation.finish.err (F:\Projects\webpack-broker\node_modules\webpack\lib\Compiler.js:675:18)
at hooks.finishModules.callAsync.err (F:\Projects\webpack-broker\node_modules\webpack\lib\Compilation.js:1261:4)
at AsyncSeriesHook.eval [as callAsync] (eval at create (F:\Projects\webpack-broker\node_modules\tapable\lib\HookCodeFactory.js:33:10), :20:1)
at AsyncSeriesHook.lazyCompileHook (F:\Projects\webpack-broker\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (F:\Projects\webpack-broker\node_modules\webpack\lib\Compilation.js:1253:28)
at hooks.make.callAsync.err (F:\Projects\webpack-broker\node_modules\webpack\lib\Compiler.js:672:17)
at _done (eval at create (F:\Projects\webpack-broker\node_modules\tapable\lib\HookCodeFactory.js:33:10), :9:1)
at _err1 (eval at create (F:\Projects\webpack-broker\node_modules\tapable\lib\HookCodeFactory.js:33:10), :32:22)
at _addModuleChain (F:\Projects\webpack-broker\node_modules\webpack\lib\Compilation.js:1185:12)
at processModuleDependencies.err (F:\Projects\webpack-broker\node_modules\webpack\lib\Compilation.js:1097:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-config@0.0.4 storybook: start-storybook
npm ERR! Exit status 1
`
The error is reproduced on - https://github.com/maximryabov22011988/webpack-broker
Branch - preparation_before_merge

Is it possible to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions