storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.62k stars 9.31k forks source link

[Bug]: Minified React error #321 #24321

Open symphony2014 opened 1 year ago

symphony2014 commented 1 year ago

Describe the bug

I am trying to upgrade the storybook by : npx storybook@latest upgrade , and then run ng run plot3d:storybook the error was thrown: image

Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Object.Q (http://localhost:6006/vendors-node_modules_storybook_addon-docs_dist_chunk-S4VUQJ4A_mjs.iframe.bundle.js:34898:9)
    at exports.useContext (http://localhost:6006/vendors-node_modules_storybook_addon-docs_dist_chunk-S4VUQJ4A_mjs.iframe.bundle.js:39871:20)
    at useMDXComponents (http://localhost:6006/vendors-node_modules_mdx-js_react_lib_index_js-node_modules_storybook_addon-docs_dist_index_m-b2769b.iframe.bundle.js:86:64)
    at Object.Template (http://localhost:6006/tool-tool-stories-mdx.iframe.bundle.js:179:165)
    at undecoratedStoryFn (http://localhost:6006/sb-preview/runtime.js:41:2791)
    at hookified (http://localhost:6006/sb-preview/runtime.js:7:18973)
    at http://localhost:6006/vendors-node_modules_storybook_addon-docs_angular_index_js-node_modules_storybook_addon-docs_-609119.iframe.bundle.js:85947:29
    at http://localhost:6006/vendors-node_modules_storybook_addon-docs_angular_index_js-node_modules_storybook_addon-docs_-609119.iframe.bundle.js:85942:14
    at cleanArgsDecorator (http://localhost:6006/vendors-node_modules_storybook_addon-docs_angular_index_js-node_modules_storybook_addon-docs_-609119.iframe.bundle.js:85996:10)
    at http://localhost:6006/vendors-node_modules_storybook_addon-docs_angular_index_js-node_modules_storybook_addon-docs_-609119.iframe.bundle.js:85941:28

here is my code, it works well in version 6.5.X: image

I am trying to debug this issue, just found two react-dom versions were applied. when the debug tool is inspected version is: react-dom 16.14.0, and my installed version is react-dom 18.2.0

image

image

To Reproduce

No response

System

No response

Additional context

No response

gokhantaskan commented 1 month ago

I am getting the error in the browser console while using Turborepo with Storybook vue3 vite. I installed and migrated via the CLI commands, but it was just a blank white page with an error in the console.

petterhoel commented 1 month ago

Same here with standalone angular (v17-lts) app after upgrading storybook from 8.2.9 to 8.3.0

liquidg3 commented 1 month ago

Just hit for me too. "storybook": "^8.3.0"

RemiKalbe commented 1 month ago

Same with turborepo + nextjs

shilman commented 1 month ago

If you're hitting this error in 8.3, please try

  1. upgrading @chromatic-com/storybook to the latest release
  2. restarting your storybook