-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Unable to build Stoybook #10970
Comments
@igreulich please google your error messages before creating new issues. I see many coincidences in the |
First I’ll take a look at that issue. Thanks for pointing that out. Second I did. I didn’t come across that particular issue. And I even went so far as to look at all the issues tagged with ‘build-storybook’. Also I am not using ‘create-react-app’ OR ‘vue’ so why would I assume issues related to those had fixes for me? I don’t have a lot of time at work (or in the rest of my day either, for that matter) to read through all 10k issues storybook has had to try and find stuff that might be related to my issue. |
Does it run OK in dev mode? Are there any browser console errors? |
@igreulich the keywords in your log are: |
@shilman Storybook does run in dev mode. And I am looking into the ticket mentioned above. Though (to my current understanding) in the end, it looks like the work around there is to use a different version of the react scripts that powers The version of With '0.8.0' installed, everything still runs in dev as well. I am going to poke around in the Storybook |
1 similar comment
@shilman Storybook does run in dev mode. And I am looking into the ticket mentioned above. Though (to my current understanding) in the end, it looks like the work around there is to use a different version of the react scripts that powers The version of With '0.8.0' installed, everything still runs in dev as well. I am going to poke around in the Storybook |
After poking things, the error was solved by adding my plugins to the build. Thanks. |
@igreulich which plugins were those? |
In my case the missing one was MiniCssExtract. I could not tell you why error was complaining about not loading I am not sure if Storybook or MiniCssExtract is the one obfuscating the error, but either way, I have it working now. |
Well the issue is back. I was able to build successfully 1 time after including my plugins.
Now I did it that way because I have no idea what plugins Storybook uses, nor am I trying to add yours to my config. I have deleted Versions Long Error Message``` λ yarn build:styleguide yarn run v1.22.4 $ build-storybook -c .storybook -o docs info @storybook/react v5.3.19 info info clean outputDir.. info => Copying prebuild dll's.. info => Building manager.. info => Loading manager config.. info => Loading presets info => Loading custom manager config. info => Compiling manager.. info => manager built (17 s) info => Building preview.. info => Loading preview config.. info => Loading presets info => Loading config/preview file in ".storybook". info => Adding stories defined in ".storybook/main.js". info => Using default Webpack setup. info => Using base config because react-scripts is not installed. env of Storybook process PRODUCTION info => Compiling preview.. ERR! => Failed to build the preview ERR! ./src/components/icon/icon.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/icon/ProductIcon.jsx 1:639-659 ERR! @ ./src/components/icon/index.js ERR! @ ./src/components/icon/SecondaryIcon.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js ERR! ./src/components/form-controls/radio/radio-group.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/form-controls/radio/RadioGroup.jsx 1:165-192 ERR! @ ./src/components/form-controls/radio/index.js ERR! @ ./src/components/form-controls/radio/Radio.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js ERR! ./src/components/form-controls/radio/radio.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/form-controls/radio/Radio.jsx 1:167-188 ERR! @ ./src/components/form-controls/radio/index.js ERR! @ ./src/components/form-controls/radio/Radio.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js ERR! ./src/components/button/button.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/button/Button.jsx 1:594-616 ERR! @ ./src/components/button/index.js ERR! @ ./src/components/button/Button.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js ERR! ./src/components/form-controls/checkbox/checkbox-group.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/form-controls/checkbox/CheckboxGroup.jsx 1:4731-4761 ERR! @ ./src/components/form-controls/checkbox/index.js ERR! @ ./src/components/form-controls/checkbox/CheckboxGroup.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js ERR! ./src/components/form-controls/checkbox/checkbox.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/form-controls/checkbox/Checkbox.jsx 1:3548-3572 ERR! @ ./src/components/form-controls/checkbox/index.js ERR! @ ./src/components/form-controls/checkbox/CheckboxGroup.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js ERR! ./src/components/toggle-button/toggle-button.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/toggle-button/ToggleButton.jsx 1:240-269 ERR! @ ./src/components/toggle-button/index.js ERR! @ ./src/components/toggle-button/ToggleButton.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js ERR! ./src/components/toggle-button/toggle-button-group.less ERR! Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ERR! TypeError: this[MODULE_TYPE] is not a function ERR! at childCompiler.runAsChild (/Users/igreulich/apps/celula/node_modules/mini-css-extract-plugin/dist/loader.js:168:24) ERR! at compile (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:343:11) ERR! at hooks.afterCompile.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:681:15) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at compilation.seal.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compiler.js:678:31) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1423:35) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (/Users/igreulich/apps/celula/node_modules/tapable/lib/Hook.js:154:20) ERR! at hooks.optimizeChunkAssets.callAsync.err (/Users/igreulich/apps/celula/node_modules/webpack/lib/Compilation.js:1414:32) ERR! at _promise0.then._result0 (eval at create (/Users/igreulich/apps/celula/node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1) ERR! at process._tickCallback (internal/process/next_tick.js:68:7) ERR! @ ./src/components/toggle-button/ToggleButtonGroup.jsx 1:665-700 ERR! @ ./src/components/toggle-button/index.js ERR! @ ./src/components/toggle-button/ToggleButton.stories.mdx ERR! @ ./src sync ^\.\/(?:(?:|\/|(?:(?:(?!(?:|\/)\.).)*?)\/)(?!\.)(?=.)[^\/]*?\.stories\.(jsx|mdx))$ ERR! @ ./.storybook/generated-entry.js ERR! @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js ./.storybook/preview.js ./.storybook/generated-entry.js (node:22976) UnhandledPromiseRejectionWarning: [object Object] (node:22976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:22976) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ```While |
I have now tried adding a
But that did not improve the situation at all. Though with |
While working on another task in my application, I can across an import bug. I thought that fixing that might have been the solution to my problem, but it was not. The build process is still broken. Any thoughts @shilman? |
@igreulich same error message? Maybe you need to check the output with |
Same issue here. I'm using those libs:
with following logs:
|
I figured out the issue. For the working build, I used...
After which I saw that
|
@Emidomenge The thing that technically fixed my issue was adding my app's plugins to the webpack config storybook uses to load my components. That is done in Here is my working one, that wont work for you, but should point you in the right direction: const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const ceConfig = require('../webpack.config.js');
const plugins = [];
module.exports = {
addons: [
'@storybook/addon-actions',
'@storybook/addon-a11y/register',
'@storybook/addon-knobs/register',
'@storybook/addon-links',
'@storybook/addon-viewport/register',
{
name: '@storybook/addon-docs',
options: {
configureJSX: true,
},
},
],
stories: ['../src/**/**/*.stories.(jsx|mdx)'],
webpackFinal: async (config, { configType }) => {
console.log('env of Storybook process', configType);
const rule = config.module.rules.find(r =>
// it can be another rule with file loader
// we should get only svg related
r.test && r.test.toString().includes('svg') &&
// file-loader might be resolved to js file path so "endsWith" is not reliable enough
r.loader && r.loader.includes('file-loader')
);
rule.test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/;
if (configType.toLowerCase() === 'production') {
plugins.push(
new MiniCssExtractPlugin({
filename: '[name].min.css',
}),
);
}
return {
...config,
module: {
...config.module,
rules: [
...config.module.rules,
...ceConfig.module.rules,
],
},
plugins: [ // This is where the magic happens.
...config.plugins,
...plugins,
],
};
},
}; |
Appreciate the help @igreulich. My project environment is a bit different than yours since it's running with create react app. I don't have a But I succeed to solve the issue by doing those steps:
Now it works fine. :) |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
Describe the bug
I am trying to build Storybook. It fails.
Steps to reproduce the behavior:
yarn build-storybook -c .storybook -o docs
Expected behavior
Story book to build.
Screenshots
From my terminal:
Code snippets
If applicable, add code samples to help explain your problem.
System:
The text was updated successfully, but these errors were encountered: