Cannot read properties of undefined (reading 'prototype')

Since yesterday I have been getting this error, seems to have started when you V2 was launched, not sure why I am getting it:

Uncaught TypeError: Cannot read properties of undefined (reading ‘prototype’)
at ./node_modules/react-moralis/lib/index.esm.js (index.esm.js:110250:1)
at webpack_require (VM1012 app.js:10968:33)
at fn (VM1012 app.js:11248:21)
at ./resources/js/index.js (VM1012 app.js:28:71)
at webpack_require (VM1012 app.js:10968:33)
at fn (VM1012 app.js:11248:21)
at ./resources/js/app.js (VM1012 app.js:10:1)
at webpack_require (VM1012 app.js:10968:33)
at VM1012 app.js:12262:183
at webpack_require.O (VM1012 app.js:11020:23)

you can try to use moralis-v1 in case that you are using moralis

yes I saw that
I even uninstalled moralis and react-morlis and reinstalled moralis-v1 and react-morlis I get the same error

what versions do you use?

“react-moralis”: “^1.4.1”,
“moralis-v1”: “^1.11.0”,

Ok so I have a temporary fix
I rolled back to these versions and the problem is gone, so must be something to do with the newer updates

npm i [email protected]
npm i [email protected]

1 Like

Of cause now I get the annoying update messages / warnings:

707.1822bc18.js:2 Moralis: You are not using the latest version of the SDK. Please update it as soon as possible to enjoy the newest features. Most recent version: 2.0.1

Any way I can remove or disable this?

I don’t know yet a solution for that warning, I also get it in vanilla js

it must be something inside the moralis sdk as I only get it for moralis

it is related to an update that was done yesterday