Replies: 2 comments
-
I have same problem with you |
Beta Was this translation helpful? Give feedback.
0 replies
-
How did you end up fixing it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using Redux Toolkit with a Preact app, I get this error in the browser console:
This error is thrown when attempting to
import {Provider} from 'react-redux;
. This crashes the app immediately; nothing is rendered. I also see thatreact-redux
does not appear to be inweb_modules
when I runsnowpack build
. When the bundler is running, it does not output any error messages; it only throws this error in the browser.I can recreate a minimal case to display this error from
create-snowpack-app
. Here are the steps to duplicate:$ cd test-case $ npm install @reduxjs/toolkit react-redux --save
The dependency versions in my
package.json
are as follows:snowpack.config.json
:./src/store.js
:<Provider>
component andstore
object intoApp.jsx
:npm start
(alias forsnowpack dev
) and then open the page in the browser.What I expect to see: The rendered bootstrapped application.
What I see: Nothing. The page is blank. When I open the console I see
Uncaught TypeError: Error resolving module specifier: react-redux
.Things I've tried:
react-redux
as expected, however, the app crashes because it expects to findreact
(which is not present because I'm usingpreact
.) This causes me to suspect aliasing may be a culprit.Things I did not try:
Hope anyone has insights to share. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions