Uncaught TypeError
yiziz opened this issue · 3 comments
yiziz commented
Using react router 6 and i have skipLibCheck
true in my tsconfig
. Why is this error showing up for me?
create.ts:183 Uncaught TypeError: Cannot read properties of undefined (reading 'location')
at Object.get location [as location] (create.ts:183:1)
at Module../src/redux/app.store.ts (app.store.ts:21:1)
at Module.options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:61:1)
at Module../src/index.tsx (index.ts:2:1)
at Module.options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at startup:7:1
at startup:7:1
Seem to point to https://github.com/salvoravida/redux-first-history/blob/master/src/create.ts#L183?
yiziz commented
My bad - had a combineReducers
error.
dsteinel commented
FYI
I had the same TypeError and was looking for quite some time for the error. In the end I needed to update the history package to the latest version (5.2.0). Apparently it only works with history v5 .
salvoravida commented
FYI I had the same TypeError and was looking for quite some time for the error. In the end I needed to update the history package to the latest version (5.2.0). Apparently it only works with history v5 .
rr6 need history v5
rr4/5 need history v4