Repository: ui
Issue: [bug]: Cannot read properties of 'undefined' on dev mode
Labels: bug

### Describe the bug

When running dev mode from the main branch (no changes applied), last commit https://github.com/shadcn-ui/ui/commit/7590fb76364c46b72653623b6ee4a96f0ad0bca8, I am getting an error that the component was not found. (I did notice it flashes shortly, maybe has something to do with hydration).

I suspect this bug was introduced with blocks, because I've never had any issues before it.

<img width="1052" alt="Screenshot 2024-04-07 at 00 09 58" src="https://github.com/shadcn-ui/ui/assets/61006057/9de1bbec-216a-46fb-8174-378bed9141b6">


### Affected component/components

All components

### How to reproduce

1. Clean install all deps with `pnpm i`
2. Run `pnpm dev`
3. Open, for example: `http://localhost:3003/docs/components/accordion`

### Codesandbox/StackBlitz link

N/A

### Logs

```bash
app-index.js:35 Warning: Cannot update a component (`HotReload`) while rendering a different component (`ComponentPreview`). To locate the bad setState() call inside `ComponentPreview`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
    at ComponentPreview (webpack-internal:///(app-pages-browser)/./components/component-preview.tsx:30:11)
    at hn (eval at getMDXComponent (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next-contentlayer@0.3.4_contentlayer@0.3.4_esbuild@0.17.19_markdown-wasm@1.2.0_next@14.1.3_react-dom@18.2.0_react@18.2.0/node_modules/next-contentlayer/dist/hooks/useMDXComponent.js), <anonymous>:492:2192)
    at div
    at Mdx (webpack-internal:///(app-pages-browser)/./components/mdx-components.tsx:433:11)
    at div
    at div
    at main
    at InnerLayoutRouter (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:242:11)
    at RedirectErrorBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/redirect-boundary.js:73:9)
    at RedirectBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/redirect-boundary.js:81:11)
    at NotFoundBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/not-found-boundary.js:84:11)
    at LoadingBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:340:11)
    at ErrorBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/error-boundary.js:161:11)
    at InnerScrollAndFocusHandler (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:152:9)
    at ScrollAndFocusHandler (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:227:11)
    at RenderFromTemplateContext (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/render-from-template-context.js:16:44)
    at OuterLayoutRouter (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:359:11)
    at InnerLayoutRouter (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:242:11)
    at RedirectErrorBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/redirect-boundary.js:73:9)
    at RedirectBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/redirect-boundary.js:81:11)
    at NotFoundBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/not-found-boundary.js:84:11)
    at LoadingBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:340:11)
    at ErrorBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/error-boundary.js:161:11)
    at InnerScrollAndFocusHandler (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/layout-router.js:152:9)
    at Scro
window.console.error @ app-index.js:35
Show 1 more frame
Show less
component-preview.tsx:43 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at HTMLUnknownElement.callCallback (react-dom.development.js:20498:14)
    at Object.invokeGuardedCallbackImpl (react-dom.development.js:20547:16)
    at invokeGuardedCallback (react-dom.development.js:20622:29)
    at beginWork (react-dom.development.js:26813:7)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at performSyncWorkOnRoot (react-dom.development.js:24777:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
3redirect-boundary.js:57 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at performSyncWorkOnRoot (react-dom.development.js:24777:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
not-found-boundary.js:37 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at performSyncWorkOnRoot (react-dom.development.js:24777:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
redirect-boundary.js:57 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at performSyncWorkOnRoot (react-dom.development.js:24777:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
not-found-boundary.js:37 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at performSyncWorkOnRoot (react-dom.development.js:24777:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
redirect-boundary.js:57 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at performSyncWorkOnRoot (react-dom.development.js:24777:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
not-found-boundary.js:37 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at performSyncWorkOnRoot (react-dom.development.js:24777:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
component-preview.tsx:43 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at HTMLUnknownElement.callCallback (react-dom.development.js:20498:14)
    at Object.invokeGuardedCallbackImpl (react-dom.development.js:20547:16)
    at invokeGuardedCallback (react-dom.development.js:20622:29)
    at beginWork (react-dom.development.js:26813:7)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at recoverFromConcurrentError (react-dom.development.js:24525:20)
    at performSyncWorkOnRoot (react-dom.development.js:24789:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
3redirect-boundary.js:57 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at recoverFromConcurrentError (react-dom.development.js:24525:20)
    at performSyncWorkOnRoot (react-dom.development.js:24789:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
not-found-boundary.js:37 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at recoverFromConcurrentError (react-dom.development.js:24525:20)
    at performSyncWorkOnRoot (react-dom.development.js:24789:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
redirect-boundary.js:57 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at recoverFromConcurrentError (react-dom.development.js:24525:20)
    at performSyncWorkOnRoot (react-dom.development.js:24789:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
not-found-boundary.js:37 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at recoverFromConcurrentError (react-dom.development.js:24525:20)
    at performSyncWorkOnRoot (react-dom.development.js:24789:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
redirect-boundary.js:57 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at recoverFromConcurrentError (react-dom.development.js:24525:20)
    at performSyncWorkOnRoot (react-dom.development.js:24789:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
not-found-boundary.js:37 Uncaught TypeError: Cannot read properties of undefined (reading 'accordion-demo')
    at eval (component-preview.tsx:43:42)
    at mountMemo (react-dom.development.js:12461:5)
    at Object.useMemo (react-dom.development.js:13159:16)
    at Object.useMemo (react.development.js:1778:21)
    at ComponentPreview (component-preview.tsx:42:19)
    at renderWithHooks (react-dom.development.js:11021:18)
    at mountIndeterminateComponent (react-dom.development.js:16782:13)
    at beginWork$1 (react-dom.development.js:18382:16)
    at beginWork (react-dom.development.js:26791:14)
    at performUnitOfWork (react-dom.development.js:25637:12)
    at workLoopSync (react-dom.development.js:25353:5)
    at renderRootSync (react-dom.development.js:25308:7)
    at recoverFromConcurrentError (react-dom.development.js:24525:20)
    at performSyncWorkOnRoot (react-dom.development.js:24789:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:10286:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:10246:3)
    at commitRootImpl (react-dom.development.js:26244:3)
    at commitRoot (react-dom.development.js:25957:5)
    at commitRootWhenReady (react-dom.development.js:24677:3)
    at finishConcurrentRender (react-dom.development.js:24642:5)
    at performConcurrentWorkOnRoot (react-dom.development.js:24487:9)
    at workLoop (scheduler.development.js:256:34)
    at flushWork (scheduler.development.js:225:14)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:534:21)
app-index.js:35 The above error occurred in the <NotFoundErrorBoundary> component:

    at NotFoundErrorBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/not-found-boundary.js:76:9)
    at NotFoundBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/not-found-boundary.js:84:11)
    at DevRootNotFoundBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/dev-root-not-found-boundary.js:33:11)
    at ReactDevOverlay (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js:84:9)
    at HotReload (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js:307:11)
    at Router (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/app-router.js:182:11)
    at ErrorBoundaryHandler (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/error-boundary.js:114:9)
    at ErrorBoundary (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/error-boundary.js:161:11)
    at AppRouter (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/components/app-router.js:538:13)
    at ServerRoot (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/app-index.js:129:11)
    at RSCComponent
    at Root (webpack-internal:///(app-pages-browser)/../../node_modules/.pnpm/next@14.1.3_@babel+core@7.22.1_@opentelemetry+api@1.4.1_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/client/app-index.js:145:11)

React will try to recreate this component tree from scratch using the error boundary you provided, ReactDevOverlay.
window.console.error @ app-index.js:35
Show 1 more frame
Show less
```


### System Info

```bash
macOS Sonoma 14.4.1

Chromium based Brave
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues