Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not able to import msw-storybook-addon #130

Closed
akib22 opened this issue Dec 12, 2023 · 2 comments
Closed

Can not able to import msw-storybook-addon #130

akib22 opened this issue Dec 12, 2023 · 2 comments

Comments

@akib22
Copy link

akib22 commented Dec 12, 2023

I tried to mock api call using msw-storybook-addon. When I tried to configure this package in preview.js, I got this error(image below).

Screenshot 2023-12-12 at 6 47 01 PM

// preview.js

import { initialize, mswLoader } from "msw-storybook-addon"

initialize()

const preview = {
    parameters: {
        actions: { argTypesRegex: "^on[A-Z].*" },
    },
    loaders: [mswLoader]
}

export default preview

Node: v18.17.1
Packages:

  • "vite": "^5.0.8"
  • "msw": "^2.0.11"
  • "msw-storybook-addon": "^1.10.0"
  • "@storybook/addon-actions": "^7.5.3"
  • "@storybook/addon-essentials": "7.0.18"
  • "@storybook/preview-api": "^7.5.3"
  • "@storybook/react-vite": "7.0.18"
@FrankvanZ
Copy link

this issue is already being tracked AFAIK here:
#121
and here:
#122

@kettanaito
Copy link
Member

Hi. I believe this has been resolved. If you still experience this issue, please submit it again, providing a reproduction repository with the latest versions of the tools. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants