redux-toolkit: Suddenly got compilation error with Typescript

Hi,

My setup is W10 with CRA 3.4.0, RTK 1.3.2 (same error with 1.3.1), using TypeScript 3.8.3

When I try to launch my React App I get a compilation error:

Attempted import error: 'enableES5' is not exported from 'immer'. in …/redux-toolkit.esm.js

any ideas? I’ve got the repo working without any problems on my other machine (MacOS) but the packages.json file is identical. I’ve tried rebuilding the whole node_modules dir to no avail… any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

You could try to use forced module resolution (immer is pretty backwards compatible, so react-dev-utils should work fine with immer6) for that.

Yarn can do that out-of-the-box, npm apparently needs a package for that: https://github.com/rogeriochaves/npm-force-resolutions