error export 'useSyncExternalStore' (imported as 'p') was not found in 'react' when importing an external library into a new repo

153 Views Asked by At

I am getting the error export 'useSyncExternalStore' (imported as 'p') was not found in 'react' when I am importing @mui/x-date-pickers from an external npm package into a consuming application also built in react. They are both on the same version of react which is "react": "^17.0.1",

I am expecting that the datepicker works in my consuming application.

1

There are 1 best solutions below

2
Jordan Ravelino On

useSyncExternalStore only available on React 18 and above, i think you should update to React 18