Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Can't Build and Run #1

Closed
greygatch opened this issue Jun 13, 2019 · 4 comments
Closed

Can't Build and Run #1

greygatch opened this issue Jun 13, 2019 · 4 comments

Comments

@greygatch
Copy link

greygatch commented Jun 13, 2019

Have to upgrade React and React Dom to 16.8, but then when you try to build and run the project, you get the following error:

Invariant Violation: Could not find "store" in the context of "Connect(WithStyles)". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to Connect(WithStyles) in connect options.

Everything works perfectly in dev mode.

@joaopaulomoraes
Copy link
Owner

Would you have more details about the error or link for playback? I did the whole process and had no problems with React 16.8.

@greygatch
Copy link
Author

greygatch commented Jun 13, 2019

Here's the issue in detail: reduxjs/react-redux#1319

When I run the "with-redux" example in the next.js project, I am able to build and run just fine. Not sure what the disconnect is.

On node v10.16.0

@greygatch
Copy link
Author

greygatch commented Jun 13, 2019

It appears that downgrading the react-redux package solved this issue for me.

"react-redux": "6.0.0"

to

"react-redux": "^5.0.1"

@joaopaulomoraes
Copy link
Owner

This is because the newer versions of redux are built differently and implemented differently.
You can see more details here.

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

No branches or pull requests

2 participants