Storybook: Failed webpack build with Monorepo on v6.0.0-beta.1

Created on 2 May 2020  路  2Comments  路  Source: storybookjs/storybook

Describe the bug
When upgrading monorepo project from 6.0.0-alpha.30 to 6.0.0-beta.1 I see the following error when I run yarn storybook. Everything works fine on alpha.30.

TypeError: params.compilationDependencies.push is not a function

To Reproduce
Install 6.0.0-beta.1 on a monorepo project.

Expected behavior
Webpack compiles.

Screenshots

info @storybook/react v6.0.0-beta.1
info
info => Loading static files from: /Users/laurie/Documents/projects/axiom-react/.storybook/static_assets .
info => Loading presets
info => Loading presets
info => Loading custom manager config.
info => Loading config/preview file in "./.storybook".
info => Adding stories defined in ".storybook/main.js".
info => Using custom postcss.config.js
info => Using default Webpack setup.
ERR! TypeError: params.compilationDependencies.push is not a function
ERR!     at /Users/laurie/Documents/projects/axiom-react/node_modules/webpack/lib/DllReferencePlugin.js:28:36
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/laurie/Documents/projects/axiom-react/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:5:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/Users/laurie/Documents/projects/axiom-react/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at Compiler.compile (/Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack/lib/Compiler.js:662:28)
ERR!     at /Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack/lib/Watching.js:77:18
ERR!     at _next0 (eval at create (/Users/laurie/Documents/projects/axiom-react/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:23:1)
ERR!     at eval (eval at create (/Users/laurie/Documents/projects/axiom-react/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:32:1)
ERR!     at watchRunHook (/Users/laurie/Documents/projects/axiom-react/node_modules/webpack-virtual-modules/index.js:173:5)
ERR!     at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/laurie/Documents/projects/axiom-react/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:28:1)
ERR!     at AsyncSeriesHook.lazyCompileHook (/Users/laurie/Documents/projects/axiom-react/node_modules/tapable/lib/Hook.js:154:20)
ERR!     at Watching._go (/Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack/lib/Watching.js:41:32)
ERR!     at /Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack/lib/Watching.js:33:9
ERR!     at Compiler.readRecords (/Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack/lib/Compiler.js:529:11)
ERR!     at new Watching (/Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack/lib/Watching.js:30:17)
ERR!     at Compiler.watch (/Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack/lib/Compiler.js:244:10)
ERR!     at wdm (/Users/laurie/Documents/projects/axiom-react/node_modules/@storybook/core/node_modules/webpack-dev-middleware/index.js:41:33)

Code snippets
Main.js

module.exports = {
  stories: ['../packages/**/*.stories.(js|mdx)'],
  addons: ['@storybook/addon-docs', '@storybook/addon-knobs'],
};

System:

 System:
    OS: macOS Mojave 10.14.3
    CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
  Binaries:
    Node: 12.16.2 - ~/.nvm/versions/node/v12.16.2/bin/node
    Yarn: 1.15.2 - ~/.yarn/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.16.2/bin/npm
  Browsers:
    Chrome: 81.0.4044.129
    Firefox: 75.0
    Safari: 12.0.3
  npmPackages:
    @storybook/addon-docs: ^v6.0.0-beta.1 => 6.0.0-beta.1
    @storybook/addon-knobs: ^v6.0.0-beta.1 => 6.0.0-beta.1
    @storybook/react: ^v6.0.0-beta.1 => 6.0.0-beta.1
babel / webpack question / support

Most helpful comment

@lpoulter Nope, webpack 4 only!

All 2 comments

Looks like this is an issue when using webpack 3. Does storybook support webpack 3?

@lpoulter Nope, webpack 4 only!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ilyaulyanov picture ilyaulyanov  路  100Comments

ilias-t picture ilias-t  路  73Comments

EdenTurgeman picture EdenTurgeman  路  81Comments

enagy27 picture enagy27  路  69Comments

moimikey picture moimikey  路  67Comments