Upgrading chakra-ui/react from v2.3.4 to v2.3.5 breaks vitest
See original GitHub issueDescription
When I upgrade chakra-ui/react from v2.3.4 to v2.3.5 it breaks vitest
Link to Reproduction
https://github.com/saifbechan/nextjs-ts-eslint-chakraui-vitest-playwright
Steps to reproduce
- Check out the repository
- Run
yarn
- Run
yarn test
- Everything works fine
- Upgrade chakra-ui/react to 2.3.5
- Run
yarn test
- You will get the following error
ReferenceError: Cannot access '__vite_ssr_import_5__' before initialization
Chakra UI Version
2.3.5
Browser
No response
Operating System
- macOS
- Windows
- Linux
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:17
- Comments:20 (4 by maintainers)
Top Results From Across the Web
Upgrading to v2
Chakra UI v2 is focused on providing compatibility for React 18. Doing so we had to introduce some breaking changes. That lead us...
Read more >Version 2.3.4 - Chakra UI
Explore the changelog for Chakra UI version 2.3.4. Learn about the latest features, bug fixes, and improvements.
Read more >Version 2.3.3 - Chakra UI
Explore the changelog for Chakra UI version 2.3.3. Learn about the latest features, bug fixes, and improvements.
Read more >Version 2.3.5
Version 2.3.5. v2.3.5. Minor Changes#. Tooltip 2.2.0 #. Added closeOnScroll prop to allow closing tooltip when the page or overflow container scrolls.
Read more >Version 2.4.3 - Chakra UI
Version 2.4.3. v2.4.3 ... Removed defaultProps from components to support React 18.3.0 ... Update modal a11y unit tests to correctly cover the portal....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This looks like a vite’s bug. https://github.com/vitejs/vite/issues/10444 You can fix vitest by
deps.fallbackCJS = true
for now. https://vitest.dev/config/#deps-fallbackcjsI have my package setup like this
and my vite,config,ts like this
still having the same problem
Does anyone have a fix for this?
thanks