Closed belforto closed 1 year ago
I get a similar issue, reproduction is available here https://github.com/blowsie/vue3-vitesse-storybook-pnpm/tree/master/packages/ui
I'm getting this error after upgrading from storybook 6.4 to 6.5 using react. Every figure out what was going on?
@charleshimmer Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. Thank you! 🙏
I got this error today when I had accidentally installed @storybook/addon-docs": "6.5.5"
, when the rest of the storybook deps were at 6.4.22
. The Docs tab was missing as well and the markdown in my .mdx
was not rendered. This is in an NX 13.4.6
repo.
I found my issue was the path for the addon-docs
needed to be changed from '@storybook/addon-docs/preset'
to '@storybook/addon-docs'
in .storybook/main.js
.
Hot reloading does seem to not be working though now :(.
Hey folks, any update regarding this issue?
Happened to us too upgrading from 6.3.12
to 6.5.9
. Additionally MDX stories are breaking too
@konsalex Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. Thank you! 🙏
Also had the same problem with version 6.5.9 Downgraded to the following set of versions and everything works fine again:
"@storybook/addon-actions": "~6.4.22",
"@storybook/addon-essentials": "~6.4.22",
"@storybook/addon-interactions": "~6.4.22",
"@storybook/addon-links": "~6.4.22",
"@storybook/builder-webpack5": "~6.4.22",
"@storybook/manager-webpack5": "~6.4.22",
"@storybook/react": "~6.4.22",
"@storybook/testing-library": "^0.0.11",
Would love for someone to figure out what the problem is
@shilman I don't have time to create a full repro, but I believe I was able track this regression to #17755.
I have two storybooks with this problem, and it seems like the only ingredient for this to occur is to have a custom .storybook/preview.js
. The error is thrown due to some refactoring of getContainer()
and getPage()
parameters in the default addon-docs preset. In 6.4, they were configured in config.ts, loaded in the common-preset module:
6.5 seems to have completely rewritten the preset entrypoint and I'm still investigating what needs to be done in order to fix this. In the meantime, I can get docs working again by including this in my .storybook/preview.js
file:
export const parameters = {
docs: {
...require('@storybook/addon-docs/preview').parameters.docs,
// other config
}
}
I found my issue was the path for the
addon-docs
needed to be changed from'@storybook/addon-docs/preset'
to'@storybook/addon-docs'
in.storybook/main.js
.
Thanks @charleshimmer this has solved this issue in our case as well.
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
Why I get this error? //storybook/main.tsx
stories: ["../src/components/*/.stories.@(tsx|mdx)", "../src/styles/*.stories.@(tsx|mdx)",],
addons: [ "@storybook/addon-essentials", "@storybook/addon-actions/register", "@storybook/addon-controls", "@storybook/addon-viewport", { name: '@storybook/addon-docs', options: { configureJSX: true, babelOptions: {}, sourceLoaderOptions: null, transcludeMarkdown: true, }, }, ],
and this is my mdx file //BlogCard.stories.mdx
import { Meta, Story } from '@storybook/addon-docs/blocks'; import * as stories from './BlogCard.stories.tsx'; import BlogCard from "./index";
...some random markdown here