Closed whoisryosuke closed 3 years ago
Same here. It looks like the latest public release of storybook doesn't work with react v17.
https://github.com/storybookjs/storybook/issues/12408#issuecomment-716637427
npx sb upgrade --prerelease
Upgrading to a prerelease version of storybook works for me.
@stackia yea this sounds exactly like that upstream issue which is due to be fixed soon and has a prerelease as you mentioned.
@whoisryosuke if you are on React 17 (which I believe you are) then this duplicates that upstream issue.
In any case, TSDX does not control what version of React nor what version of Storybook you use, so this upstream issue is out-of-scope.
However, #916 tracks a similar bug that occurs with tsdx create
which is in-scope. The issue with "bootstrapping" and running into this error would be a duplicate of that.
Current Behavior
yarn storybook
Checking the console, I see the following errors output:
I tried changing the story output to see if it was the
tsdx
packaged component inindex.tsx
(<Thing />
), but got the same error. I'm assuming it has something to do with Storybook, maybe a bugged version.Expected behavior
Storybook launches with example component.
Suggested solution(s)
I tried updating Storybook, but it seems the most up to date, so maybe roll back to a more stable release? Looking at the Storybook config I don't see anything odd that might cause this. Has to be on the Storybook dependency side. Maybe a mismatch of React versions between deps.
Additional context
Your environment