-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Unexpected default export without title: {"includeStories":[],"parameters":{"docs":{}}} #8675
Comments
@o-t-w this all looks fine to me. do you have a repro repo you can share? |
Checked your repro repo at https://github.com/o-t-w/storybook-ds and it looks like a whitespace issue. This works: import { Meta, Story } from "@storybook/addon-docs/blocks";
import { withKnobs, select, boolean } from "@storybook/addon-knobs";
import CreditCard from "../src/CreditCard.js";
<Meta title="CreditCard" component={CreditCard} />
# Credit card
- This component must use `inputmode="numeric"` in order to bring up the correct keyboard on mobile.
<Story name="standard">
<CreditCard />
</Story> AFAIK this is an issue with the underlying MDX parser and not a Storybook issue, tho I could be wrong. |
Thanks @shilman, that worked :) |
I'm running into the same issue. I'm using the manual setup because I couldn't figure out how to make the preset work with typescript. Here's my setup: addons.js
config.js:
webpack.config.js
stories/Test.stories.mdx:
Full stack trace:
|
I didn't realize that I needed a |
|
I run into this today. Just to make the "whitespace issue" more clear, the fix was to add an empty line in between my imports and the |
I'm running into this issue. I tried all stuff from above, none worked.
I guess i'm missing something in the config files |
@pfmartins4 https://github.com/storybookjs/storybook/blob/next/addons/docs/src/frameworks/common/preset.ts#L121 |
@shilman you guys should really be using |
I had this issue when upgrading from Storybook v5.3 to v6. We also upgraded to use module.exports = {
stories: [`${process.cwd()}/webpack/**/*.stories.@(js|mdx)`],
addons: [
'@storybook/addon-docs',
... Due to the new // Stories MDX loader
config.module.rules.push({
test: /\.mdx$/,
exclude: /node_modules/,
use: [
{
loader: require.resolve('babel-loader'),
},
{
loader: require.resolve('@mdx-js/loader'),
options: {
compilers: [createMdxCompiler({})],
},
},
],
}); So with this setup, MDX was trying to process the same files twice. The way it manifested was this exact error. Also, it was doing some really crazy things like taking a variable named
Removing |
Describe the bug
I am getting the error Unexpected default export without title: {"includeStories":[],"parameters":{"docs":{}}}
To Reproduce
I only have one story: CreditCard.stories.mdx:
I have installed the necessary dependencies:
config.js file:
addons.js file:
presets.js file:
System:
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
Browsers:
Chrome: 78.0.3904.70
Firefox: 70.0
Safari: 13.0.1
npmPackages:
@storybook/addon-actions: ^5.2.5 => 5.2.5
@storybook/addon-docs: ^5.2.5 => 5.2.5
@storybook/addon-knobs: ^5.2.5 => 5.2.5
@storybook/addon-links: ^5.2.5 => 5.2.5
@storybook/addons: ^5.2.5 => 5.2.5
@storybook/react: ^5.2.5 => 5.2.5
The text was updated successfully, but these errors were encountered: