-
Notifications
You must be signed in to change notification settings - Fork 593
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
Uncaught TypeError: Cannot read property 'pathname' of undefined #54
Comments
Could you inspect more whether which LOC causes that error and what's the value of state in your redux store? |
I'm using Also looks like this exception is the cause why It's hard to trace what happens atm since I'm using I'll try to provide more details if I'll be able to debug this. |
hmm, just before that I got a warning:
|
I just tried downgrading, seems like this is not related to the fact I did upgrade recently.
makes no sence. I checked with previous versions of Seems like |
That's interesting. Could you provide me a minimal repo that reproduces this problem? I'll try working on it then. |
Well, that's not easy, I'll try to provide one later this week. |
not sure if related but I was having similar if not identical error due to importing the wrong ConnectedRouter.
|
Thanks, @dimatter but that did not help. :( |
The problem is you don't have store.replaceReducer(nextRootReducer); // your code now (probably) to: store.replaceReducer(connectRouter(history)(nextRootReducer)); // how it should be done |
@iceekey Thanks a lot! The seem very reasonable. I tried this and after quick check did not face my issue. I'll work with this for some time and will report later if the issue is completely resolved. |
Seems like issue is resolved. Thanks, @iceekey |
I am getting this issue in my environment, but the suggested solution is not working in my case: This is my setup: My codesStore.js
App.js
PageActions.js
PageReducer.js
RootReducer.js
ErrorThis is the error which I am getting: More infoIn my The error indication is exactly the same as the original thread, but the suggested solution by @iceekey is not working in my case (as you can see, I have already added it in my code). I really lost here. Any help on this issue is really appreciated. Thank you. |
+1 |
@progammer-rkt did you find a solution? Im having the same problem or similar problem, im getting |
Ohh well, 3 hours later ... I had these problems because i use a custom immutableJS solution, ie my top reducers are not Immutable but their children are. So my state looks similar to this:
So i access my state by doing The provided solution for ImJs with
|
@progammer-rkt I found a typo in your store. You declare the const History like this : |
<Provider store={store}>
<ConnectedRouter history={history}>
<div>
<Switch>
<Route exact path="/" render={() => (<div><App/></div>)} />
<Route render={() => (<div>Miss</div>)} />
</Switch>
</div>
</ConnectedRouter>
</Provider>
Replace the above code in index.js it will work |
@progammer-rkt Did you ever resolve this issue? I'm having very similar issue and very similar code. |
in line 11; |
This happens to me when using HMR (only after I chnage something I'm working on). Strange enough but this happend on any action
I did not notice such behaviour with previous versions.
From
package.json
:The text was updated successfully, but these errors were encountered: