testing-react icon indicating copy to clipboard operation
testing-react copied to clipboard

@storybook/preview-web stops exporting WebProjectAnnotations at 6.5.0

Open dakotalightning opened this issue 2 years ago • 3 comments

Describe the bug

../../node_modules/@storybook/testing-react/dist/types.d.ts:2:15 - error TS2305: Module '"@storybook/preview-web"' has no exported member 'WebProjectAnnotations'.

2 import type { WebProjectAnnotations } from '@storybook/preview-web';

To Reproduce Use any @storybook version above v6.5.0

Should be ~6.4.0 https://github.com/storybookjs/testing-react/blob/16f7182de1dfa9b186ac5a8957760974577008f6/package.json#L79

Looks like they remove WebProjectAnnotations export at v6.5.0-alpha.53. Seems like a breaking change to me. 🤷🏽‍♂️ https://github.com/storybookjs/storybook/commit/bcf7e4d03a1e58a1862379adbfd98d1be67194e4#diff-a10f71fb35c8a250ffdfe123e528271e550f05469a3e09e1ae746555707972a5

dakotalightning avatar Jun 03 '22 16:06 dakotalightning

Storybook v6.5.0 is causing problems See https://github.com/storybookjs/storybook/issues/16797

dakotalightning avatar Jun 03 '22 16:06 dakotalightning

@yannbf

I cannot use Storybook 6.5 because of this problem. Can this problem be resolved?

sakit0 avatar Aug 02 '22 06:08 sakit0

I'm also struggling to upgrade to 6.5 because of this.

ingokpp avatar Aug 04 '22 08:08 ingokpp

Same here, 6.5.10.

https://github.com/elastic/kibana/pull/139334

clintandrewhall avatar Aug 24 '22 21:08 clintandrewhall

Maybe a solution is to re-export WebProjectAnnotations from @storybook/store (where it moved to) from @storybook/preview-web (where it moved from, and where testing-react is looking for it.

IanVS avatar Aug 25 '22 02:08 IanVS

I created a pr. https://github.com/storybookjs/testing-react/pull/115

sakit0 avatar Aug 25 '22 07:08 sakit0

Fix released in https://github.com/storybookjs/storybook/releases/tag/v6.5.11

dakotalightning avatar Sep 14 '22 16:09 dakotalightning

It doesn't work until v6.5.10, but specify to use v6.5.11 or later?

sakit0 avatar Sep 15 '22 00:09 sakit0