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/estree is outdated #29443

Open
unional opened this issue Oct 24, 2024 · 2 comments · May be fixed by #29477
Open

[Bug]: @storybook/react - @types/estree is outdated #29443

unional opened this issue Oct 24, 2024 · 2 comments · May be fixed by #29477

Comments

@unional
Copy link
Contributor

unional commented Oct 24, 2024

Describe the bug

Getting this error when building a image snapshot plugin for vitest browser mode integration:

node_modules/rollup/dist/rollup.d.ts (4:0): "BaseNode" is not exported by "node_modules/@types/estree/index.d.ts", imported by "node_modules/rollup/dist/rollup.d.ts".
DTS Build failed

This happen as I need to augment the BrowserPage type in @vitest/browser/context.

rollup is using @types/estree 1.0.6, while @storybook/react is using 0.0.51

Reproduction link

https://github.com/repobuddy/storybook-image-snapshot

Reproduction steps

  • Checkout branch sb-estree
  • npm i
  • npm build

Should observe:

DTS ⚡️ Build success in 802ms
DTS dist/preview.d.ts 61.00 B
node_modules/rollup/dist/rollup.d.ts (4:0): "BaseNode" is not exported by "node_modules/@types/estree/index.d.ts", imported by "node_modules/rollup/dist/rollup.d.ts".
Error: error occured in dts build

System

Storybook Environment Info:

  System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.10.0 - /run/user/1000/fnm_multishells/962_1729806910856/bin/node
    Yarn: 1.22.21 - /run/user/1000/fnm_multishells/962_1729806910856/bin/yarn
    npm: 10.2.3 - /run/user/1000/fnm_multishells/962_1729806910856/bin/npm <----- active
    pnpm: 9.12.1 - /run/user/1000/fnm_multishells/962_1729806910856/bin/pnpm
  npmPackages:
    @storybook/addon-essentials: ^8.3.6 => 8.3.6 
    @storybook/addon-interactions: ^8.3.6 => 8.3.6 
    @storybook/addon-links: ^8.3.6 => 8.3.6 
    @storybook/blocks: ^8.3.6 => 8.3.6 
    @storybook/experimental-addon-test: ^8.3.6 => 8.3.6 
    @storybook/icons: ^1.2.10 => 1.2.10 
    @storybook/react: ^8.3.6 => 8.3.6 
    @storybook/react-vite: ^8.3.6 => 8.3.6 
    @storybook/test: ^8.3.6 => 8.3.6 
    storybook: ^8.3.6 => 8.3.6

Additional context

No response

@unional
Copy link
Contributor Author

unional commented Oct 26, 2024

On a similar line, it specify @types/node: 22 as a regular dependency. This causes consuming repository using other version of @types/node to fail:

Image

...@[email protected]/...' is not assignable to type ...@[email protected]/...'.

@unional
Copy link
Contributor Author

unional commented Oct 29, 2024

Same thing on pinning @vitest/* in @storybook/test.

These lead to vitest-dev/vitest#6674 with vitest integration

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.

2 participants