[SOLVED] Moralis.initPlugins() is not working

Hello, I’m trying to use the 1Inch plugin, but I’m getting this error:

Uncaught (in promise) TypeError: Moralis.initPlugins is not a function
    at fetchsome (MainDex.tsx:17)

I have installed the latest version of Moralis SDK "moralis": "0.0.54", with npm install moralis and the server is updated to the latest version. The 1inch Plugin has also been successfully downloaded too.

I used const Moralis = require('moralis'); and in the function, I have this code like this:

await Moralis.enable;
await Moralis.initPlugins();

Am I doing something wrong or have I missed something?

Thanks in advance!

Hey @Markus-55

Check again your dependencies. Actually the latest version is 0.0.67

1 Like

Ok thanks, I have tried to update it again with npm install moralis but the version stays at 0.0.54. Is there another way to update it?

Try to manually uninstall and install it

1 Like

I did that and it updated to the latest version, but I’m still getting the same error

Could you share the full code?
Are you using nodeJs?

I’m not using nodeJs, but I use react, should have told that before sorry.

But it worked after I restarted the localhost! I think it started working after I updated to the latest version as you said, so the localhost must have needed a reset.

Thanks a lot for the help Yomoo! :smile:


You are welcome!

Happy BUIDLing :man_mechanic:

1 Like