Skip to content

[Bug]: React Devtools error after migrating to Storybook 10 #32964

@mx-liebald

Description

@mx-liebald

Describe the bug

After upgrading Storybook from 9.1.16 to 10.0.5, the React Devtools produce the following console error:

Uncaught Error: React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build

Reproduction link

https://stackblitz.com/github/storybookjs/sandboxes/tree/next/react-vite/default-ts/after-storybook?file=README.md

Reproduction steps

  1. Install and enable react dev tools
  2. Open the above example
  3. Open the preview in a new tab

System

Storybook Environment Info:

  System:
    OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12800H
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.21.1 - ~/.nvm/versions/node/v22.21.1/bin/node
    Yarn: 1.22.19 - /mnt/c/Program Files (x86)/Yarn/bin/yarn
    npm: 10.9.4 - ~/.nvm/versions/node/v22.21.1/bin/npm <----- active
  Browsers:
    Chrome: 141.0.7390.107
  npmPackages:
    @storybook/addon-docs: 10.0.5 => 10.0.5 
    @storybook/react-vite: 10.0.5 => 10.0.5 
    eslint-plugin-storybook: 10.0.5 => 10.0.5 
    storybook: 10.0.5 => 10.0.5

Additional context

  • The issue can also be recreated with the basic React + Vite setup obtained using npm create storybook@latest
  • Tested in Chrome and Firefox

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Empathy Queue (prioritized)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions