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

Webpack5: Stats handling is broken #13974

Closed
shilman opened this issue Feb 20, 2021 · 1 comment
Closed

Webpack5: Stats handling is broken #13974

shilman opened this issue Feb 20, 2021 · 1 comment

Comments

@shilman
Copy link
Member

shilman commented Feb 20, 2021

Describe the bug

When I run build-storybook in a @storybook/builder-webpack5 project, I get the following error:

/Users/shilman/projects/testing/react-ts/node_modules/@storybook/builder-webpack5/dist/cjs/index.js:182
        stats.toJson(statsOptions).warnings.forEach(function (e) {
                                           ^

TypeError: Cannot read property 'forEach' of undefined
    at /Users/shilman/projects/testing/react-ts/node_modules/@storybook/builder-webpack5/dist/cjs/index.js:182:44

When I log out the stats.toJson results, I get the following:

{
  name: 'preview',
  logging: {
    'webpack.Compiler': { entries: [], filteredEntries: 9, debug: false },
    'webpack.FlagDependencyExportsPlugin': { entries: [], filteredEntries: 4, debug: false },
    'webpack.InnerGraphPlugin': { entries: [], filteredEntries: 1, debug: false },
    'webpack.Compilation': { entries: [], filteredEntries: 23, debug: false },
    'webpack.SideEffectsFlagPlugin': { entries: [], filteredEntries: 1, debug: false },
    'webpack.FlagDependencyUsagePlugin': { entries: [], filteredEntries: 2, debug: false },
    'webpack.buildChunkGraph': { entries: [], filteredEntries: 9, debug: false },
    'webpack.SplitChunksPlugin': { entries: [], filteredEntries: 4, debug: false },
    ModuleConcatenationPlugin: { entries: [], filteredEntries: 7, debug: false },
    'webpack.FileSystemInfo': { entries: [], filteredEntries: 14, debug: false }
  }
}

Needs more investigation, but I will patch this over to allow people to test out webpack5

@shilman
Copy link
Member Author

shilman commented Feb 20, 2021

Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.0-alpha.31 containing PR #13975 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Feb 20, 2021
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

1 participant