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

[Bug]: Storybook Server 8.0.8 autodoc error - Element type is invalid #26849

Open
mrtimbrook opened this issue Apr 15, 2024 · 0 comments
Open

Comments

@mrtimbrook
Copy link

Describe the bug

Storybook Server shows an error on the Docs page:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

It's a clean install with only the server url parameter defined in preview.js and main.js configured as so:

const config = {
  stories: ["../src/**/*.stories.json"],
  addons: [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@chromatic-com/storybook",
    "@storybook/addon-interactions",
  ],
  framework: {
    name: "@storybook/server-webpack5",
    options: {},
  },
  docs: {
    autodocs: "tag",
  },
};
export default config;

image

To Reproduce

  1. Setup clean Storybook Server install
  2. Enable autodocs in main.ts|js
  3. Create component story json with "tags": [ "autodocs"] set
  4. Run storybook and navigate to Docs page for component

System

Storybook Environment Info:

  System:
    OS: macOS 14.2.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm <----- active
    pnpm: 8.10.2 - ~/.nvm/versions/node/v18.16.0/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.122
    Safari: 17.2.1
  npmPackages:
    @storybook/addon-essentials: ^8.0.8 => 8.0.8 
    @storybook/addon-interactions: ^8.0.8 => 8.0.8 
    @storybook/addon-links: ^8.0.8 => 8.0.8 
    @storybook/blocks: ^8.0.8 => 8.0.8 
    @storybook/server-webpack5: ^8.0.8 => 8.0.8 
    @storybook/test: ^8.0.8 => 8.0.8 
    storybook: ^8.0.8 => 8.0.8

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Empathy Backlog
Development

No branches or pull requests

2 participants