Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Storybook 7.0 alpha.44 removed defaultDecorateStory, breaks testing-react #119

Closed
IanVS opened this issue Oct 31, 2022 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@IanVS
Copy link
Member

IanVS commented Oct 31, 2022

I attempted to upgrade storybook to the latest alphas, and got this error:

'defaultDecorateStory' is not exported by node_modules/@storybook/client-api/dist/index.mjs, imported by node_modules/@storybook/testing-react/dist/testing-react.esm.js
file: /Users/ianvs/code/defined/webclient/node_modules/@storybook/testing-react/dist/testing-react.esm.js:1:28
1: import { combineParameters, defaultDecorateStory } from '@storybook/client-api';
                               ^
2: import addons, { mockChannel, HooksContext, applyHooks } from '@storybook/addons';

The only thing I'm using from this library is:

import { composeStory } from '@storybook/testing-react';
@IanVS IanVS mentioned this issue Nov 1, 2022
6 tasks
@IanVS
Copy link
Member Author

IanVS commented Nov 1, 2022

Note for others having trouble with this, you might be able to import composeStory from @storybook/react instead, in recent 7.0 alpha versions.

@0xDing
Copy link

0xDing commented Nov 3, 2022

Note for others having trouble with this, you might be able to import composeStory from @storybook/react instead, in recent 7.0 alpha versions.

But @storybook/react has invalid esm dist, that not work in vitest

storybookjs/storybook#19501

@yannbf yannbf added the bug Something isn't working label Nov 6, 2022
@IanVS
Copy link
Member Author

IanVS commented Jan 26, 2023

This is fixed in version v2.0.0-next.0. Please let us know if you still have any problems after updating.

@IanVS IanVS closed this as completed Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants