Skip to content

[Bug]: @storybook/react 9.0.0-rc.3 type error #31527

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

Open
mrginglymus opened this issue May 21, 2025 · 4 comments · May be fixed by #31537
Open

[Bug]: @storybook/react 9.0.0-rc.3 type error #31527

mrginglymus opened this issue May 21, 2025 · 4 comments · May be fixed by #31537

Comments

@mrginglymus
Copy link
Contributor

mrginglymus commented May 21, 2025

Describe the bug

When type checking:

.yarn/__virtual__/@storybook-react-virtual-d17d932f4d/2/.yarn/berry/cache/@storybook-react-npm-9.0.0-rc.3-6b0272b8a0-10c0.zip/node_modules/@storybook/react/dist/observable-like.d-b7430e69.d.ts:1:9 - error TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.

1 declare global {
          ~~~~~~


Found 1 error in .yarn/__virtual__/@storybook-react-virtual-d17d932f4d/2/.yarn/berry/cache/@storybook-react-npm-9.0.0-rc.3-6b0272b8a0-10c0.zip/node_modules/@storybook/react/dist/observable-like.d-b7430e69.d.ts:1

Reproduction link

https://stackblitz.com/edit/github-z41zrfuy

Reproduction steps

No response

System

-

Additional context

No response

@mrginglymus
Copy link
Contributor Author

mrginglymus commented May 21, 2025

This may be a tsup bug? It's shaking and splitting the dts files, but seems to have left only the global declaration from observable-like in its own file, which isn't valid.

Possibly related: egoist/tsup#843; still appears in latest tsup.

@mrginglymus
Copy link
Contributor Author

To catch these in the future: #31554

@djamaile
Copy link

Is there a workaround for this besides setting skipLibCheck=true?

@mrginglymus
Copy link
Contributor Author

I have currently patched out the offending file using yarn so that I can continue to test the rest of the rc.

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.

3 participants