Closed robcaldecott closed 1 year ago
i am running into the same issue with nextjs and typescript 4.9.5. using storybook 7.0.0-beta.44.
Screenshot showing all the details:
Same issue, also from a clean repro with SB CLI
Same here typescript 4.9.5 and storybook 7.0.0-beta.45. Here is minimal repro: https://github.com/diginikkari/storybook-satisfies-issue
note that this is not just SB 7.0. In storybook 6.5.15 this also crashes if satisfies is used anywhere in the code, not just in the stories
Shall we look at this one together @valentinpalkovic? Seems quite some people are affected @vanessayuenn @shilman
note that this is not just SB 7.0. In storybook 6.5.15 this also crashes if satisfies is used anywhere in the code, not just in the stories
I confirm, we too are completely blocked, we make extensive use of satisfies
now in the code
Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.55 containing PR #21104 that references this issue. Upgrade today to the @next
NPM tag to try it out!
npx sb@next upgrade --prerelease
Thanks @valentinpalkovic and @shilman, I can confirm that in my case, satisfies
is now working as expected!
is there a separate issue tracking this for the 6.5
version?
@cellog No. We will only port critical security fixes back to 6.5.
@cellog No. We will only port critical security fixes back to 6.5.
I understand. I disagree strongly with that decision because of both the developer experience, and the risk it poses to the business model of Chromatic.
7.0 stable is not out yet, and a bug that prevents us from taking advantage of a recent but still relatively old TS version won't be back-ported. We are still struggling to migrate our stories from knobs to controls, the pace of breaking changes to storybook has been very difficult to keep up with. It opens up opportunities for others to step in. This is the kind of signal that makes us start to investigate alternatives to storybook more seriously.
Your prerogative, of course, and take this for what it is: friendly advice. Thank you for the reply.
@cellog, I understand your concerns and appreciate them! I can at least offer to help you find a workaround for 6.5.
So, as far as I can see, the @storybook/nextjs
doesn't even exist for version 6. I am curious about how you use Next.js in Storybook. This ticket was about fixing @storybook/nextjs
to support satisfies. Do you use @storybook/nextjs
as well in your Storybook 6.5 project?
@valentinpalkovic we are not using nextjs. We are just using storybook as-is with babel. We only just migrated to babelV7, so perhaps that will give us the control we need to fix this?
Describe the bug
Yesterday I read about support for using
satisfies
in stories here: https://storybook.js.org/blog/improved-type-safety-in-storybook-7/However, it does not work in the 7.0 beta 45 using
@storybook/nextjs
and generates ababel
error:I am using TS 4.9.5 and in my editor the code is not generating a TS error. In my demo the
components/Alert/Alert.stories.tsx
file looks like this:Note that
satisfies
works fine in the NextJS app itself.To Reproduce
System
Additional context
No response