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/react types is incompatible with @types/react@19 Cannot find namespace 'JSX'. #30104

Open
devjiwonchoi opened this issue Dec 18, 2024 · 0 comments

Comments

@devjiwonchoi
Copy link

Describe the bug

When using @types/[email protected], namespace JSX is incompatible with @storybook/react.

../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]_prettie
│ [email protected][email protected]._5kgjpaibxhkriyp7xn7cohsd4e/node_modules/@storybook/react/dist/types
│ -a5624094.d.ts:7:18 - error TS2503: Cannot find namespace 'JSX'.
│ 
│ 7     mount: (ui?: JSX.Element) => Promise<Canvas>;

Reproduction link

https://github.com/devjiwonchoi/repro-storybook-react-types

Reproduction steps

To reproduce, run:

pnpm install && pnpm typecheck

System

Storybook Environment Info:

  System:
    OS: macOS 15.1.1
    CPU: (12) arm64 Apple M3 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.0 - ~/.local/state/fnm_multishells/39919_1730290910573/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - ~/.local/state/fnm_multishells/39919_1730290910573/bin/npm
    pnpm: 8.15.4 - /usr/local/bin/pnpm <----- active
  Browsers:
    Chrome: 131.0.6778.140
    Safari: 18.1.1
  npmPackages:
    @storybook/react: ^8.4.7 => 8.4.7

Additional context

No response

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

Successfully merging a pull request may close this issue.

1 participant