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 webpack build failed after migration #18326

Open
itaied246 opened this issue May 25, 2022 · 1 comment
Open

Storybook webpack build failed after migration #18326

itaied246 opened this issue May 25, 2022 · 1 comment

Comments

@itaied246
Copy link

Describe the bug
I have upgraded storybook to 6.5.5 and running the migrations as documented here but I get the following error when running build-storybook

To Reproduce
Failed to run the repro step

System

Environment Info:

  System:
    OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.23.0-20220130.1630 - ~/.nvm/versions/node/v16.15.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 101.0.4951.41
    Firefox: 100.0.2
  npmPackages:
    @storybook/addon-essentials: ^6.5.5 => 6.5.5 
    @storybook/addon-info: ^5.3.21 => 5.3.21 
    @storybook/addon-links: ^6.5.5 => 6.5.5 
    @storybook/addons: ^6.5.5 => 6.5.5 
    @storybook/react: ^6.5.5 => 6.5.5 

Additional context

yarn build-storybook 
yarn run v1.23.0-20220130.1630
warning ../../../package.json: No license field
$ build-storybook
info @storybook/react v6.5.5
info 
info => Cleaning outputDir: /storybook-static
info => Loading presets
info => Compiling preview..
info Addon-docs: using MDX1
info => Using implicit CSS loaders
(node:688524) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.

See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
(Use `node --trace-deprecation ...` to show where the warning was created)
info => Using default Webpack4 setup
Starting type checking service...
ERR! => Failed to build the preview
ERR! ./node_modules/public-ip/index.js 166:30
ERR! Module parse failed: Unexpected token (166:30)
ERR! You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
ERR! | 			const urls = [
ERR! | 				...type[version].httpsUrls,
ERR! > 				...(options.fallbackUrls ?? []),
ERR! | 			];
ERR! | 
ERR!  @ ./node_modules/@ui/helpers/dist/helpers.esm.js 7:0-33 2618:21-29 2618:49-57
ERR!  @ ./src/components/input/Input.tsx
ERR!  @ ./src/components/input/Input.stories.tsx
ERR!  @ ./src sync ^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.(ts|tsx|js|jsx))$
ERR!  @ ./generated-stories-entry.js
ERR!  @ multi ./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js ./node_modules/@storybook/core-client/dist/esm/globals/globals.js ./storybook-init-framework-entry.js ./node_modules/@storybook/react/dist/esm/client/docs/config-generated-config-entry.js ./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js ./node_modules/@storybook/addon-links/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-docs/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js ./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js ./.storybook/preview.js-generated-config-entry.js ./generated-stories-entry.js
ERR! Error: => Webpack failed, learn more with --debug-webpack
ERR!     at /home/dev/ui/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:249:60
ERR!     at finalCallback (/home/dev/ui/node_modules/webpack/lib/Compiler.js:257:39)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compiler.js:273:13
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:51:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at onCompiled (/home/dev/ui/node_modules/webpack/lib/Compiler.js:271:21)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compiler.js:681:15
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compiler.js:678:31
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compilation.js:1423:35
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compilation.js:1414:32
ERR!  Error: => Webpack failed, learn more with --debug-webpack
ERR!     at /home/dev/ui/node_modules/@storybook/builder-webpack4/dist/cjs/index.js:249:60
ERR!     at finalCallback (/home/dev/ui/node_modules/webpack/lib/Compiler.js:257:39)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compiler.js:273:13
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:51:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at onCompiled (/home/dev/ui/node_modules/webpack/lib/Compiler.js:271:21)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compiler.js:681:15
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compiler.js:678:31
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compilation.js:1423:35
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/dev/ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/home/dev/ui/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at /home/dev/ui/node_modules/webpack/lib/Compilation.js:1414:32
info => Loading presets
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@vislogurov
Copy link

vislogurov commented Dec 9, 2022

Yo! No ideas how to fix it? Have this errors too(

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

No branches or pull requests

2 participants