[6.2.7] Cannot create a Story without a component set in export default
See original GitHub issueDescribe the bug
An error is thrown when trying to display a story not having a component set in “export default”.

To Reproduce
import { Meta, Story } from '@storybook/angular';
export default {
title: 'HTML Elements/Buttons'
} as Meta;
export const Base: Story = args => ({
props: args,
template: '<button>{{content}}</button>'
});
Base.args = {
content: 'Primary button'
};
Expected behavior
The HTML element “button” should appear on the page without any error.
System
System:
OS: macOS 11.0.1
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 14.15.1 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.14.13 - /usr/local/bin/npm
Browsers:
Chrome: 89.0.4389.114
Safari: 14.0.1
npmPackages:
@storybook/addon-essentials: ^6.2.1 => 6.2.7
@storybook/angular: ^6.2.1 => 6.2.7
Workaround
Pass any component in “export default”

┆Issue is synchronized with this Asana task by Unito
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
[6.2.7] Cannot create a Story without a component set in export ...
An error is thrown when trying to display a story not having a component set in "export default". To Reproduce import { Meta,...
Read more >storybook@6 throws a core-js error · Issue #11255 - GitHub
With storybook 6, my very basic typescript setup throws errors about core-js polyfills every time. Module not found: Error: Can't resolve ...
Read more >Component Story Format (CSF) - Storybook
Every component story file consists of a required default export and one or more named exports. CSF is supported in all frameworks except...
Read more >storybook cannot read properties of undefined - You.com
The TypeError: Cannot read properties of undefined (reading 'type') exception occurs in storybook when one defines the argTypes in the default export object ......
Read more >Home does not contain an export named Home - Stack Overflow
The error is telling you that you are importing incorrectly. Here's the code you have to add: import { Home } from './layouts/Home';....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Perfect it reproduces well the problem
Well it seems to be linked to
ngccif not executed it works perfectly ^^ Storybook does not use ivy yet but should be compatible with a workspace using itIt will be necessary to add this change earlier than expected https://github.com/storybookjs/storybook/pull/11157/files#diff-70601b7629ca05a548de90f4bd456a56cbd6494c5bb3028f0942267ba1a8167fR45
@shilman I’ll propose a PR
Hurrah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.9 containing PR #14586 that references this issue. Upgrade today to the
@latestNPM tag to try it out!