Ask questions'current' is not exported from 'immer'.

reduxjs/toolkit 1.4.0

./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js Attempted import error: 'current' is not exported from 'immer'.

What is the issue and fix for this?


Answer questions phryneas

It should not matter, but it could be all sorts of weird configuration on your machine, like the admin prompt having a different PATH variable and using a different node version or something.

Generally, you should never run anything as administrator except if you are making active modifications to your operating system or need to install software for all users of your machine. It is definitely never required to actively do software development. It is a possibility that you did a npm install or yarn install as administrator (which you should NEVER do, as node packages can run arbitratry code on installation) and that the immer module folder is owned by administrator now and cannot be accessed by your normal user. Best to delete node_modules folder and run npm/yarn install as a normal user again.

Lenz Weber phryneas @mayflower Germany DevOp at @mayflower. Interested in react, typescript, security and nixos. (I know, a strange combination)
Github User Rank List