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]: TS2786 error when updating Storybook to v7.4.0. #24011

Closed
Karibash opened this issue Aug 30, 2023 · 5 comments
Closed

[Bug]: TS2786 error when updating Storybook to v7.4.0. #24011

Karibash opened this issue Aug 30, 2023 · 5 comments

Comments

@Karibash
Copy link

Describe the bug

Updating Storybook to v7.4.0 causes TS2786 error.
This is due to a type mismatch caused by multiple versions of @types/react being installed.
It should be possible to solve this problem by revert the following commit.

8ceec7d

To Reproduce

No response

System

No response

Additional context

No response

@wand2016
Copy link

wand2016 commented Aug 31, 2023

Hello, team.

I think this kind of deps should be in peerDependencies.

@garyjohnson
Copy link

We also ran into this issue after upgrading to 7.4.0. Our project has "@types/react": "^18.2.4" defined as a devDependency.

@sebil
Copy link

sebil commented Sep 1, 2023

Make sure you also add "@storybook/types": "^7.4.0", to your package.json to dedupe all addons types packages.
Fixed it for me.

I think this is caused by @storybook/addon-styling, it's the only package on my project that still uses @storybook/types@7.1.1
Just use npm ls --depth=1 @storybook/types to see which package might not using the new 7.4.0 types on your project.

I recommend to always use npx storybook@latest upgrade to update your storybook versions, it's really comfortable and shows hints for possible issues.

@JReinhold
Copy link
Contributor

We've released v7.5.0-alpha.0 that might contain a fix for this (#24042). Could you try it out and tell us if it fixes the issue? If it does, we'll release it in a patch.

npx storybook@next upgrade --prerelease

@shilman shilman added the sev:S2 label Sep 2, 2023
@Methuselah96
Copy link
Contributor

The alpha fixed the issue for me, looking forward to it being released in a 7.4 patch!

rlecellier added a commit to openfun/richie that referenced this issue Sep 4, 2023
Version 7.4.0 of storybook use a old @types/react@^16.14.34
In order to successfully execute `yarn install --frozen-lockfile` we
need to upgrade it to 7.5.0-alpha that fix it.
see storybookjs/storybook#24011 (comment)
rlecellier added a commit to openfun/richie that referenced this issue Sep 5, 2023
Version 7.4.0 of storybook use a old @types/react@^16.14.34
In order to successfully execute `yarn install --frozen-lockfile` we
need to upgrade it to 7.5.0-alpha that fix it.
see storybookjs/storybook#24011 (comment)
rlecellier added a commit to openfun/richie that referenced this issue Sep 5, 2023
Version 7.4.0 of storybook use a old @types/react@^16.14.34
In order to successfully execute `yarn install --frozen-lockfile` we
need to upgrade it to 7.5.0-alpha that fix it.
storybookjs/storybook#24011 (comment)
NathanVss pushed a commit to openfun/richie that referenced this issue Sep 8, 2023
Version 7.4.0 of storybook use a old @types/react@^16.14.34
In order to successfully execute `yarn install --frozen-lockfile` we
need to upgrade it to 7.5.0-alpha that fix it.
storybookjs/storybook#24011 (comment)
NathanVss pushed a commit to openfun/richie that referenced this issue Sep 8, 2023
Version 7.4.0 of storybook use a old @types/react@^16.14.34
In order to successfully execute `yarn install --frozen-lockfile` we
need to upgrade it to 7.5.0-alpha that fix it.
storybookjs/storybook#24011 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

7 participants