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]: can not build stories with Bun #30654

Open
ianzone opened this issue Feb 25, 2025 · 2 comments
Open

[Bug]: can not build stories with Bun #30654

ianzone opened this issue Feb 25, 2025 · 2 comments

Comments

@ianzone
Copy link

ianzone commented Feb 25, 2025

Describe the bug

I could build components with Bun but I couldn't build stories with it.

Reproduction link

/~https://github.com/ianzone/storybook-init

Reproduction steps

  1. clone and install deps
  2. run build:storybook:bun

System

System:
    OS: Linux 5.15 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13800H
    Shell: 5.9 - /home/linuxbrew/.linuxbrew/bin/zsh
  Binaries:
    Node: 22.14.0 - /home/linuxbrew/.linuxbrew/opt/node@22/bin/node
    Yarn: 1.22.22 - /home/linuxbrew/.linuxbrew/bin/yarn
    npm: 10.9.2 - /home/linuxbrew/.linuxbrew/opt/node@22/bin/npm <----- active
    pnpm: 10.4.1 - /home/linuxbrew/.linuxbrew/bin/pnpm
  npmPackages:
    @storybook/addon-a11y: ^8.5.8 => 8.5.8
    @storybook/addon-coverage: ^1.0.5 => 1.0.5
    @storybook/addon-essentials: ^8.5.8 => 8.5.8
    @storybook/addon-interactions: ^8.5.8 => 8.5.8
    @storybook/addon-links: ^8.5.8 => 8.5.8
    @storybook/blocks: ^8.5.8 => 8.5.8
    @storybook/react: ^8.5.8 => 8.5.8
    @storybook/react-vite: ^8.5.8 => 8.5.8
    storybook: ^8.5.8 => 8.5.8

Additional context

No response

@valentinpalkovic
Copy link
Contributor

Hi @ianzone

Thank you for reporting.

Please append the error message to the issue. Thank you!

@ianzone
Copy link
Author

ianzone commented Feb 25, 2025

Hi @ianzone

Thank you for reporting.

Please append the error message to the issue. Thank you!

Hi the output is here, I notice [vite:esbuild] in the error, but I have no issue running bunx --bun vite build

$ bunx --bun storybook build --docs --output-dir storybook
@storybook/core v8.6.0

info => Cleaning outputDir: storybook
info => Loading presets
info => Building manager..
info => Manager built (148 ms)
info => Building preview..
info Using tsconfig paths for react-docgen
The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
[addon-coverage] Adding istanbul plugin to Vite config

[vite:dts] You are building a library that may not need to generate declaration files.

vite v6.2.0 building for production...
✓ 34 modules transformed.
✗ Build failed in 1.23s
=> Failed to build the preview
[vite:esbuild] failed to resolve "extends":"./tsconfig.dom.json" in ./node_modules/es-proj/tsconfig/tsconfig.react.json
file: ./.storybook/preview.ts
    at new TSConfckParseError (./node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:11999:3)
    at resolveExtends (./node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:11857:12)
    at <anonymous> (./node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:11792:24)
    at processTicksAndRejections (native:7:39)
transforming (110) node_modules/react-dom/cjs/react-dom.production.js

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