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

[Bug]: Storybook-build failing on Angular 17 #26942

Open
AlexKman opened this issue Apr 24, 2024 · 1 comment
Open

[Bug]: Storybook-build failing on Angular 17 #26942

AlexKman opened this issue Apr 24, 2024 · 1 comment

Comments

@AlexKman
Copy link

Describe the bug

For my angular project (Node v20.11.0) I am unable to run storybook-build. I can successfully use yarn storybook and view all my storybook components in the browser but the build always fails.

=> Failed to build the preview
SB_BUILDER-WEBPACK5_0003 (WebpackCompilationError): There were problems when compiling your code with Webpack.
Run Storybook with --debug-webpack for more information.
at ./node_modules/@storybook/builder-webpack5/dist/index.js:1:10937
at ./node_modules/webpack/lib/HookWebpackError.js:68:3
at Hook.eval [as callAsync] (eval at create (./node_modules/tapable/lib/HookCodeFactory.js:33:10), :11:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (./node_modules/tapable/lib/Hook.js:18:14)
at Cache.shutdown (./node_modules/webpack/lib/Cache.js:150:23)
at ./node_modules/webpack/lib/Compiler.js:1242:15
at Hook.eval [as callAsync] (eval at create (./node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (./node_modules/tapable/lib/Hook.js:18:14)
at Compiler.close (./node_modules/webpack/lib/Compiler.js:1235:23)
at ./node_modules/@storybook/builder-webpack5/dist/index.js:1:10922
at finalCallback (./node_modules/webpack/lib/Compiler.js:454:32)
at ./node_modules/webpack/lib/Compiler.js:471:13
at Hook.eval [as callAsync] (eval at create (./node_modules/tapable/lib/HookCodeFactory.js:33:10), :23:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (./node_modules/tapable/lib/Hook.js:18:14)
at onCompiled (./node_modules/webpack/lib/Compiler.js:469:21)
at ./node_modules/webpack/lib/Compiler.js:1213:17
at eval (eval at create (./node_modules/tapable/lib/HookCodeFactory.js:33:10), :13:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Broken build, fix the error above.
You may need to refresh the browser.

Im running ng run projctName:build-storybook|

Angular json build-storybook =

    "build-storybook": {
      "builder": "@storybook/angular:build-storybook",
      "options": {
        "configDir": ".storybook",
        "browserTarget": "projectName:build",
        "compodoc": true,
        "compodocArgs": ["-e", "json", "-d", "."],
        "outputDir": "storybook-static"
      }
    }

To Reproduce

This is a work project so I can't add the repository but Ive added the node version worked on and current storybook versions.

System

Storybook Environment Info:

  System:
    OS: macOS 14.3
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 2.15.12 - ~/Documents/distrelec-shop/js-storefront/distrelecStore/node_modules/.bin/npm <----- active
  Browsers:
    Chrome: 124.0.6367.62
    Safari: 17.3
  npmPackages:
    @storybook/addon-actions: ^7.4.6 => 7.6.10 
    @storybook/addon-designs: ^7.0.9 => 7.0.9 
    @storybook/addon-essentials: ^7.4.6 => 7.6.10 
    @storybook/addon-interactions: ^7.4.6 => 7.6.10 
    @storybook/addon-links: ^7.4.6 => 7.6.10 
    @storybook/angular: ^7.4.6 => 7.6.10 
    @storybook/testing-library: ^0.2.2 => 0.2.2 
    chromatic: ^11.3.0 => 11.3.0 
    eslint-plugin-storybook: ^0.8.0 => 0.8.0 
    storybook: ^7.4.6 => 7.6.10

Additional context

No response

@valentinpalkovic
Copy link
Contributor

Can you remove all add-ons and build again? If the build is successful, please readd the add-ons one by one to figure out which one causes the issue.

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