Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'Contract')

Got this error and the NFTs on my marketplace do no longer show. Don’t think I changed anything in the code.

seems similar to this one: TypeError: Cannot read properties of undefined (reading 'utils')

and related to this: Moralis JS SDK v1.0 (migration to Ethers.js)

Ok Thanks, it works again.
I put in this for now:
<script src="https://unpkg.com/[email protected]/dist/moralis.js"></script>
Is it ok to stay on this version?

And do I have to do this:

Looks like everything is working after the one change that I posted earlier.

it is ok for now, but in the future you may need to update the code to be able to use the newer version, as that version will have improvements in the future

I need my marketplace for a maximum of 6 months and I don’t want to have problems later on. Will I be fine if I leave it like it is now?

you can live it like that if it works fine now

1 Like