typeError: Right-hand side of 'instanceof' is not an object

Hello,

I have a problem when I use the “runContractFunction” or “getNFTMetadata” function on the client side (front) in React, I get the following error message:

react_devtools_backend.js:4012 TypeError: Right-hand side of ‘instanceof’ is not an object
at isApiRequestError (ApiRequestError.ts:12:1)
at RequestController.makeError (RequestController.ts:71:1)
at RequestController. (RequestController.ts:56:1)
at step (ApiRequestError.ts:31:1)
at Object.throw (ApiRequestError.ts:31:1)
at rejected (ApiRequestError.ts:31:1)

when i use the node.js back side function it works fine but when i run the client side React code it doesn’t work, i use “moralis”: “^2.9.0”
Here is my code :

Hey @gareth7923,

Thanks for reaching out to us :grinning_face_with_smiling_eyes:.

The SDK we provide currently mostly only work for backend and no frontend. However, we are on the works to releasing a new Frontend SDK for React that will be coming very soon.

I saw this error before, I don’t remember what was the solution. You may find other similar forum threads.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.