Open user-aslkdflkc opened 1 year ago
Hi there,
No pressure, I know you guys are swamped with the v7 release. I just wanted to let you know that we we're here if you have any questions about this issue. We're very excited to use storybook for writing all of our angular components in our production system, but type errors like this keep coming up which prevent us from using it. We've been debugging for a little over a week, and don't have any ideas how to fix it, happy to work with you if you have ideas you'd like us to try.
Same problem here. I have fullcalendar in my project, and exactly same errors.
@user-aslkdflkc I found the cause to these errors.
fullcalendar use Preact, and this React alternative framework exports its namespace as... React.
So this namespace overrides the Storybook React namespace, and Preact has no members such as ReactElement
or ComponentType
...
A very (very) dirty hack to get the build OK is rename this export to React2 in node_modules/preact/compat/src/index.d.ts
, but I don't know how override this export in the build elegantly...
Hope that helps
@DarwinOnLine , that's pretty cool that it has to do with fullcalendar's use of Preact. I'm afraid that I don't think we can use this (clever) technique --- I don't see a non-hacky way to do it in our production codebase.
@user-aslkdflkc Is this still an issue in Storybook 7?
Having this issue now with Angular 15, SB 7.4 and some custom storybook plugins.
This issue appeared after the upgrade from 7.3 to 7.4
Describe the bug I'm having trouble getting Storybook to install. I'm able to install it with a fresh Angular 13 repo, but as soon as I import the popular calendar package fullcalendar it stops working. Here's a minimal repo reproducing the error. (I don't think it's specific to that package, because you get the same error if you have a minimal repo using other packages as well (eg, vue-advanced-chat).
To Reproduce
You can reproduce the error by initializing Storybook in the FullCalendar sample repo, and I've copy/pasted the commands below.
I provided the reproduction this way because you can see that the repo both with and without Storybook, but I'm happy to provide a repo generated via npx storybook@next repro as well, please let me know if you'd like that as well.
System Please paste the results of
npx sb@next info
here.Additional context Add any other context about the problem here.
I posted about this in Discord as well, here is the link: https://discord.com/channels/486522875931656193/490770949910691862