Closed gerhat closed 1 year ago
This seems to be an issue with react-docgen-typescript-plugin
Having the same issue happy to see this issue is known 😄
Hi @shilman
A PR was sent on the dep repo https://github.com/hipstersmoothie/react-docgen-typescript-plugin/pull/70
Any chance to motivate @hipstersmoothie to merge, release and then update storybook/react dep to fix warnings ? 🚀
https://github.com/hipstersmoothie/react-docgen-typescript-plugin/pull/70 has been merged. If anyone has time to bump this to see if it addresses the warnings that would be great!
I can't get rid of the warning. Can I try something?
@gravyboat @yogarasu @LinnJS @lianapache @gerhat after updating to latest version (6.5.13) warnings are gone.
Note: i'm using react 18
Nope for me, warnings are still presented is sb 6.5.13. It seems that storybook uses own fork of mentioned plugin
@storybook/react-docgen-typescript-plugin@1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0 in my storybook installation.
It means that someone from storybook core maintainers has to update this dependency according mentioned issue by @gravyboat. Then it will be fixed.
It seems that @shilman is responsible for plugin fork - https://github.com/storybookjs/react-docgen-typescript-plugin. So @shilman please, can you update @storybook/react-docgen-typescript-plugin to upstream version which includes updates mentioned by @gravyboat which seems fixed this issue?
current stable Typescript is 4.9.2 (4.9 was released before 2 days), but many of us stuck with 4.7.x because of this issue.
Would be cool to see it this merged!! :)
I'm getting this issue with TypeScript 4.9.3.
UPDATE: If you're using pnpm
(and maybe Yarn?), you can manually fix this with a key like this in your package.json
file:
"pnpm": {
"overrides": {
"@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2"
}
}
Note sure why Storybook forked it, or why they aren't keeping it up to date, but that removes the deprecation warnings. 🤷
@matthew-dean according the repo, it seems that there are some storybook patches, so I don't know if overriding plugin is save. It's used in doc part of the storybook. When you overrides, all your doc pages are fine?
@onigoetz made the PR https://github.com/storybookjs/react-docgen-typescript-plugin/pull/8, thank you very much. So @shilman can you review, merge this one? For upcoming 6.5.14 which is in progress please.
I also encountered this issue. It would be nice if it can be fixed in the upcoming 6.5.14 release as @MirKml said.
Issue still present in storybook 6.5.14. Looking forward to a fix.
The following is a workaround that worked for me using yarn 3.x:
package.json
:
"resolutions": {
"@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2"
}
yarn
@bosycom's resolution workaround worked for me, for the time being.
@bosycom's solution worked for me! Many thanks :)
Just upgraded to the latest Storybook (6.5.15) and still seeing this.
Issue still present in storybook 6.5.14. Looking forward to a fix.
The following is a workaround that worked for me using yarn 3.x:
- Add to
package.json
:"resolutions": { "@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2" }
- Run
yarn
- Fixed, storybook runs without deprecation warnings from the plugin
Tried the fix but didn't work for 6.5.15
Same issue in 7.0.0-beta.20
.
Issue still present in storybook 6.5.14. Looking forward to a fix.
The following is a workaround that worked for me using yarn 3.x:
- Add to
package.json
:"resolutions": { "@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2" }
- Run
yarn
- Fixed, storybook runs without deprecation warnings from the plugin
Same warnings with "@nrwl/storybook": "^15.6.2",
This didn't work.
Same issue with 6.5.16 All the above solutions didn't work. Also, storybook is not running with node v18. Only v16.
Ermahgerd!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.48 containing PR #21095 that references this issue. Upgrade today to the @next
NPM tag to try it out!
npx sb@next upgrade --prerelease
I see you drop fork completely - 👍. Little bit sad that it's only for sb 7.0+, but it's OK, workaround with package.json overrides works. I will looking forward for 7.0 with typescript 5.0 😉
BTW @uditalias - latest sb 6 works fine with node 18
still happens in 7.0.0 beta 53
Ermahgerd!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.61 containing PR #21380 that references this issue. Upgrade today to the @next
NPM tag to try it out!
npx sb@next upgrade --prerelease
Using latest typescript 5.0.2 causes issues with storybook-addon-actions, and if I revert to typescript 4.9.5 I get to this issue which is still NOT resolved :(
If you add below code to your package.json it will remove the deprecation warnings, yes. But it will make your hot reload 300% slower. I guess deprecation warnings are better in this case.
"resolutions": { "@storybook/react-docgen-typescript-plugin": "npm:react-docgen-typescript-plugin@1.0.2" }
Describe the bug After upgrading TypeScript to 4.8.2 from 4.7.4 I am getting the following deprecation warnings at the console:
To Reproduce Execute:
Then select:
react
,react_typescript
,any_folder_name
e.g.:After it finishes installing everything try:
You should be able to see the warnings towards the top.
System