I'm updating @reduxjs/toolkit from v1.2.4 to the latest v1.3.2 in a Create-React-App and the build fails with this error message:
./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js
Attempted import error: 'enableES5' is not exported from 'immer'.
I also tried v1.3.0 and v1.3.1 but both give me the same problem, so I guess it has something to do with [email protected].
I'm using the latest [email protected] with [email protected].
Does anyone have any idea of what might be happening?
Thanks!
https://github.com/reduxjs/redux-toolkit/issues/466 and https://github.com/reduxjs/redux-toolkit/issues/459 should solve your problem.
Thanks a lot @phryneas! I'll follow the issue on https://github.com/facebook/create-react-app/issues/8750
I fixed it with yarn add immer and adding this at the top of the file where I have the configureStore() call:
import { enableES5 } from 'immer';
enableES5();
I fixed it with
yarn add immerand adding this at the top of the file where I have theconfigureStore()call:import { enableES5 } from 'immer'; enableES5();
tnx
Most helpful comment
I fixed it with
yarn add immerand adding this at the top of the file where I have theconfigureStore()call: