Skip to content

[Bug]: Multiple Stories in doc not possible with Angular #25579

Closed as not planned

Description

Describe the bug

I want to add the a story in a doc mdx file multiple times


import { Meta, Story, Source } from '@storybook/addon-docs';

import * as BadgeStories from './badge.stories';

<Meta title="Components/Badge/Variations" />

<Story of={BadgeStories.badgeInfo} />
<Story of={BadgeStories.badgeInfo} />

Angular console warning shows:

core.mjs:2045 NG0912: Component ID generation collision detected. Components 'StorybookWrapperComponent' and 'StorybookWrapperComponent' with selector 'story--p-badge--badge-warning-inner' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID. Find more at https://angular.io/errors/NG0912

Is there an easy fix?

To Reproduce

No response

System

Storybook Environment Info:

  System:
    OS: Linux 6.4 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (12) x64 AMD Ryzen 5 5600G with Radeon Graphics
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.8.0 - /usr/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn <----- active
    npm: 10.1.0 - /usr/bin/npm
  npmPackages:
    @storybook/addon-essentials: 7.6.4 => 7.6.4 
    @storybook/addon-interactions: ^7.6.4 => 7.6.4 
    @storybook/addon-links: 7.6.4 => 7.6.4 
    @storybook/angular: 7.6.4 => 7.6.4 
    @storybook/builder-webpack5: 7.6.4 => 7.6.4 
    @storybook/core-server: 7.6.4 => 7.6.4 
    @storybook/jest: ^0.2.3 => 0.2.3 
    @storybook/testing-library: ^0.2.2 => 0.2.2 
    eslint-plugin-storybook: 0.6.15 => 0.6.15 
    storybook: 7.6.4 => 7.6.4

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions