AfterClass-io / afterclass.io-v2

[alpha] v2 of https://afterclass.io!
https://afterclass-io.vercel.app
MIT License
4 stars 2 forks source link

[BUG] checkbox storybook `cannot access before initialization` error on local dev #97

Closed davidlhw closed 3 months ago

davidlhw commented 3 months ago

Describe the bug

checkbox storybook throwing cannot access before initialization error on local dev

Steps To Reproduce

  1. yarn storybook, wait until build is complete
  2. head to localhost:6006, should be directed to the first storybook Breadcrumb
  3. click checkbox storybook or another component using checkboxes like FilterToggleSection
  4. see error
    Cannot access 'Checkbox' before initialization
    ReferenceError: Cannot access 'Checkbox' before initialization
       at Module.Checkbox (http://localhost:6006/common-components-Checkbox-Checkbox-stories.iframe.bundle.js:363:55)
       at Module.Checkbox (http://localhost:6006/common-components-Checkbox-Checkbox-stories.iframe.bundle.js:518:100)
       at registerExportsForReactRefresh (http://localhost:6006/vendors-node_modules_pmmmwh_react-refresh-webpack-plugin_client_ErrorOverlayEntry_js-node_mod-7eca0a.iframe.bundle.js:798:36)
       at Object.executeRuntime (http://localhost:6006/vendors-node_modules_pmmmwh_react-refresh-webpack-plugin_client_ErrorOverlayEntry_js-node_mod-7eca0a.iframe.bundle.js:830:3)
       at $ReactRefreshModuleRuntime$ (http://localhost:6006/common-components-Checkbox-Checkbox-stories.iframe.bundle.js:546:34)
       at ./src/common/components/Checkbox/index.ts (http://localhost:6006/common-components-Checkbox-Checkbox-stories.iframe.bundle.js:559:2)
       at options.factory (http://localhost:6006/runtime~main.iframe.bundle.js:635:31)
       at __webpack_require__ (http://localhost:6006/runtime~main.iframe.bundle.js:28:33)
       at fn (http://localhost:6006/runtime~main.iframe.bundle.js:293:21)
       at ./src/common/components/Checkbox/Checkbox.tsx (http://localhost:6006/common-components-Checkbox-Checkbox-stories.iframe.bundle.js:370:85)

Expected behavior

checkbox storybook renders normally

Screenshots

image

Environments