immerjs / use-immer

Use immer to drive state with a React hooks
MIT License
4.04k stars 92 forks source link

Attempted import error: 'freeze' is not exported from 'immer' (imported as 'r'). #97

Closed libin1991 closed 1 year ago

libin1991 commented 2 years ago
index.js:1437 ./node_modules/_use-immer@0.6.0@use-immer/dist/use-immer.module.js
Attempted import error: 'freeze' is not exported from 'immer' (imported as 'r').
mweststrate commented 2 years ago

Reproduction etc plz

On Sun, 2 Jan 2022, 08:39 码中仙, @.***> wrote:

index.js:1437 .@.***@use-immer/dist/use-immer.module.js Attempted import error: 'freeze' is not exported from 'immer' (imported as 'r').

— Reply to this email directly, view it on GitHub https://github.com/immerjs/use-immer/issues/97, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBFIQTBFBPOQ5DYVUYLUT76K5ANCNFSM5LDMBDKQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

zzlzm commented 2 years ago

Same problem +1, downgrade to version 0.5.2 solved

Evanl-lai commented 2 years ago

Demoted to version 0.5.2, but it didn't work for me, and the problem continued.

citrusjunoss commented 2 years ago

+1

Evanl-lai commented 2 years ago

So the problem is still unresolved. Please

citrusjunoss commented 2 years ago

other package depend low version of Immer, update immer reslove this error for me

mweststrate commented 2 years ago

This is not a bug in the package but in your project setup. Please make sure peer dependencies are satisfied or provide a reproduction. Further just +1-ing on this issue is pointless.

On Wed, 13 Apr 2022, 03:31 橙, @.***> wrote:

other package depend low version of Immer, update immer reslove this error for me

— Reply to this email directly, view it on GitHub https://github.com/immerjs/use-immer/issues/97#issuecomment-1097488451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBHFGVY6E5ADURM25ULVEYWYHANCNFSM5LDMBDKQ . You are receiving this because you commented.Message ID: @.***>

epranka commented 2 years ago

Try to install "immer"