reduxjs/redux-toolkit

Unhandled JS Exception: Cannot read property 'prototype' of undefined

HardiBavariya opened this issue · 2 comments

Hi, I have integrated redux-toolkit using panpm but getting this error:

Unhandled JS Exception: Cannot read property 'prototype' of undefined

TypeError: Cannot read property 'prototype' of undefined
at ../../node_modules/.pnpm/immer@10.0.4/node_modules/immer/dist/cjs/immer.cjs.development.js (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:22714:23)
at call (native)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35)
at call (native)
at webpack_require (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37)
at fn (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28)
at ../../node_modules/.pnpm/immer@10.0.4/node_modules/immer/dist/cjs/index.js (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:22747:39)
at call (native)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35)
at call (native)
at webpack_require (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37)
at fn (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28)
at ../../node_modules/.pnpm/@reduxjs+toolkit@2.2.3_react-redux@9.1.0_react@18.2.0/node_modules/@reduxjs/toolkit/dist/cjs/redux-toolkit.development.cjs (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:53613:40)
at call (native)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35)
at call (native)
at webpack_require (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37)
at fn (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28)
at ../../node_modules/.pnpm/@reduxjs+toolkit@2.2.3_react-redux@9.1.0_react@18.2.0/node_modules/@reduxjs/toolkit/dist/cjs/index.js (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:960:39)
at call (native)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35)
at call (native)
at webpack_require (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37)
at fn (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28)
at ./src/store.tsx (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:14107:330)
at call (native)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35)
at call (native)
at webpack_require (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37)
at fn (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28)
at ./src/App.tsx (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:11995:1511)
at call (native)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35)
at call (native)
at webpack_require (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37)
at fn (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28)
at ./index.js (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:11951:854)
at call (native)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35)
at call (native)
at webpack_require (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37)
at anonymous (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:61149:56)
at global (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:61152:12)

../../node_modules/.pnpm/immer
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:22714:23
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35
webpack_require
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37
fn
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28
../../node_modules/.pnpm/immer
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:22747:39
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35
webpack_require
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37
fn
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28
../../node_modules/.pnpm/
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:53613:40
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35
webpack_require
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37
fn
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28
../../node_modules/.pnpm/
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:960:39
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35
webpack_require
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37
fn
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28
./src/store.tsx
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:14107:330
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35
webpack_require
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37
fn
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28
./src/App.tsx
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:11995:1511
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35
webpack_require
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37
fn
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59917:28
./index.js
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:11951:854
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:60259:35
webpack_require
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:59728:37
anonymous
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:61149:56
global
index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.seaapps.digico:61152:12

Can you provide a minimal repro?

Based on the call stack, this actually looks like an Immer issue, but without any kind of repro there's nothing further we can say.