Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0-beta.0 breaks ESM in redux-toolkit to 2.0.0-beta.3?.. #632

Closed
avi-0 opened this issue Oct 28, 2023 · 5 comments
Closed

5.0.0-beta.0 breaks ESM in redux-toolkit to 2.0.0-beta.3?.. #632

avi-0 opened this issue Oct 28, 2023 · 5 comments

Comments

@avi-0
Copy link

avi-0 commented Oct 28, 2023

I got here from trying to fix reduxjs/redux-toolkit#1960 by switching my redux-toolkit to 2.0.0-beta.3, however I started getting the following error message

✘ [ERROR] No matching export in "node_modules/reselect/dist/reselect.mjs" for import "autotrackMemoize"

    node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs:4:109:
      4 │ import { createSelector, createSelectorCreator as createSelectorCreator2, defaultMemoize as defaultMemoize2, autotrackMemoize, weakMapMemoize } from "reselect";
        ╵                                                                                                              ~~~~~~~~~~~~~~~~

on my Vite dev server as well as

export { createSelector, createSelectorCreator, defaultMemoize, autotrackMemoize, weakMapMemoize } from 'reselect';
                                                                ^

SyntaxError: The requested module 'reselect' does not provide an export named 'autotrackMemoize'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

on my backend Node server.

I have no idea about anything going on but I found out that reselect 5.0.0-beta.0 released literally an hour before I got myself into this, so I tried switching reselect to 5.0.0-alpha.2 and the issue is gone. Let me know if you need more information about my setup

@markerikson
Copy link
Contributor

Yep, I know :) about to put out a new RTK beta with a fix for that in literally the next couple minutes :)

@markerikson
Copy link
Contributor

also I'm honestly impressed anyone's even trying RTK 2.0 beta right now :) we get so little feedback.

@avi-0
Copy link
Author

avi-0 commented Oct 28, 2023

what happened is I dedided to use Redux both on the client and on the server as a basis for a very simple multiplayer rollback networking system, so I was directed to that issue and trying 2.0 seemed easier than figuring out how to make the workaround work (it fixed createSlice but then addListener needed something too?..). fun fact this is literally my first redux project god help me

@markerikson
Copy link
Contributor

@avi-0
Copy link
Author

avi-0 commented Oct 28, 2023

ty!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants