-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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]: Unable to start Storybook 6.5.x for react after upgrade Typescript to 5.+ #21642
Comments
Workarounds: package json: "resolutions": {
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
},
"scripts": {
"build-storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider build-storybook"
} |
Works perfectly! Thanks! Is this fixed with the Storybook 7.+? |
See also here: hipstersmoothie/react-docgen-typescript-plugin#78 (comment). The solution provided there worked for me when dealing with the issue. |
I think this is fixed in 7.0 already. Can anybody please try upgrading & report back? Many thanks! 🙏 Migration guide: https://storybook.js.org/migration-guides/7.0 |
@shilman I see that you added the "Needs more info" tag - can you please share which info is required? This looks pretty cut-and-dry to me: there were deprecation warnings long before Typescript 5 was actually released when you ran Storybook:
So we know exactly why it's now broken - Typescript 5 dropped those methods entirely, but there was never an update to the dependencies of |
@ryami333 Storybook 7 is in RC so if it works there then that would be useful info to know. I doubt we'll fix in 6.5 since it risks destabilizing that release for current users. I know that the latest version of react-docgen-typescript-plugin is buggy since I've fixed some of those bugs in our fork. It's not as simple as bumping the version. |
I have a private React project that fails to start with SB 6.5+TS 5.0, and succeeds with SB 7+TS 5.0 (and SB 6.5+TS 4.9) In other words: Yes this seems to be fixed in Storybook 7.0 |
Related issue storybookjs/storybook#21642
Thanks the resolution worked to solve the issue here https://github.com/dooboolab/dooboo-ui/actions/runs/4461816661/jobs/7835929160 |
Great workaround! 👍 With Node v18.14.1, Typescript 5.0.2 and @storybook/react 6.5.16, just adding "resolutions": {
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
}, seems to be enough to fix the build. I'm not sure whether |
Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.17-alpha.0 containing PR #21745 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
@shilman are there any further steps other than updating the package? With this prerelease package, Storybook starts without errors, but the controls from 3rd party libs are gone (it was working for me with Storybook 6.5 and TypeScript 4). What I mean by 3rd party is that I'm wrapping MUI components (which use Here's an example:
A simple Story that loads this Breadcrumbs component gives me "No inputs found for this component" My |
None of the above solutions worked for me but, this worked! Thanks! |
@mrharispe that's why it's a prerelease. we are still flushing out the bugs in the new version of the package. |
I'm just trying to help the Storybook team figure out bugs before GA. Simply giving repro steps to what I think is a bug, please don't take it the wrong way, I can't wait to use Storybook 7! Keep up the good work! |
Could you make it or a clone public? I've tried upgrading to 7.0 and it breaks. So I thought, let's confirm that SB 7 works. I created a new project, with React. And installed Storybook 7 fresh. It breaks. It would be nice to see a React repo with SB 7 working. |
I can confirm that this is not fixed with the combination of SB 7.0.7 and TS 5.0.4.
|
The issue persist with Storybook 7.1 |
UPDATE Our SB Webpack build was configured to dynamically load and register the obsolete react-docgen-typescript-loader package, which uses the deprecated top-level TS Compiler APIs, causing a failure at build time. (Its functionality was absorbed into the react-docgen-typescript-plugin package, which has been upgraded to use the corresponding factory APIs.) As it turns out, we had an old rule referencing this loader package but was no longer needed - once we removed it from our SB WebPack config we were good to go. |
What would be the solution? |
@caiocaprio https://github.com/TerrySlack/WebPack-5-React-Typescript-BoilerPlate |
@shilman seems like the alpha release fixes my issue too - thanks a lot! But, why was it never released in a proper v6.5.17 release instead of an alpha release? |
there was a breaking change with TS 5.X storybookjs/storybook#21642
there was a breaking change with TS 5.X storybookjs/storybook#21642
there was a breaking change with TS 5.X storybookjs/storybook#21642
Describe the bug
I'm currently on Storybook
6.5.16
for React.After upgrading Typescript to version
5.0.2
, the following errors are throwing when I start storybook:To Reproduce
clone https://github.com/annidai/default-ts
yarn && yarn storybook
System
Additional context
No response
The text was updated successfully, but these errors were encountered: