wagmi: [bug] Can't import the named export 'useSyncExternalStore' from non EcmaScript module
Is there an existing issue for this?
- I have searched the existing issues
Package Version
0.3.1
Current Behavior
I have no clue where it originates, I only migrated from ^0.1.3 to ^0.3.1 then suddenly it starts becoming an issue
Expected Behavior
Should not throw this exception
Steps To Reproduce
Create a new project and use multiple hooks and specifically use version ^0.1.3 then migrate to ^0.3.1 so you’ll have to change most hooks since it returns single object
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?

About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 24 (8 by maintainers)
please have a look at https://github.com/tannerlinsley/react-query/releases/tag/v4.0.0-beta.17 where we’ve hopefully fixed the upstream issue.
useSyncExternalStoreis backwards compatible and should work with any version of React that supports hooks.can confirm, updating to
"react-scripts": "5.0.1"resolved this issue for mefor the record, we’re working around this issue using react-app-rewired for the time being, at least until we migrate away from the old CRA version
@tmm we were using
react-scripts@4.0.3. upgrading to v5 would be a large lift since v5 no longer provides polyfills for node core modules by default. see this issue. is that what would be required to get this working?