When I try to build my React app using craco build, I get the following error message:
> MyApp@1.0.0 build
> craco build
Creating an optimized production build...
Failed to compile.
Attempted import error: 'useSyncExternalStore' is not exported from 'react' (imported as 'e').
What should happen
The build should be successful.
To reproduce
I'm just running craco build. I'm unaware of any other steps to get to this point.
Could this be due to a dependency on React 16 in one of the libraries I'm using? If so, is there a way for me to see which one this is? I've already searched my code and there's no place where useSyncExternalStore is imported directly.
What's happening
When I try to build my React app using
craco build
, I get the following error message:What should happen
The build should be successful.
To reproduce
I'm just running
craco build
. I'm unaware of any other steps to get to this point.CRACO version (ex. 7.0.0)
7.1.0
CRACO config
package.json
Additional information
Could this be due to a dependency on React 16 in one of the libraries I'm using? If so, is there a way for me to see which one this is? I've already searched my code and there's no place where
useSyncExternalStore
is imported directly.