Moralis Objects : Enable, Plugins, and InitPlugins, not defined?

Oh I posted a pic of my current Moralis SDK above. Here you go! This came from my package.json file image

@solalch

Plugins are not available currently from the react library. You can import ā€œmoralisā€ itself and use his Plugins functionality

1 Like

But Plugins support for the react will be added in the coming days.

Thanks YooMoo, I seem to be getting an issue still even when importing straight from Moralis instead of react-moralis where the enable and initPlugins properties are not found.image

You need to import it this way: import { Moralis } from "moralis"

Hi Yomoo, I used { Moralis } and still Moralis.enable and Moralis.initPlugins are not recognized?

What you get if you run Moralis.CoreManager.get("VERSION")? It should show you current Moralis SDK version that you have.
Do you get only a warning or an error on execution for Moralis.enable and Moralis.initPlugins?

I just ran the code and itā€™s the same version that was in my package.json, 0.0.45

image

After updating moralis today Iā€™ve started experiencing other issues. When I call authenticate with wallet provider set to wallet connect, it no longer works. Metamask authenticate still works. It has been working for the last month and after updating npm moralis and npm react moralis today it stopped working. No errors in console, itā€™s like nothing happens?

image

Please share your repo, itā€™s difficult to debug screens.
Iā€™ve tested yesterday importing import { Moralis } from "moralis" and .Plugins work with it correctly

Regarding walletconnect, make sure you have isntalled it npm install @walletconnect/web3-provider

Sure thing! The github repo is : https://github.com/solidity-alchemist/Eviral
The authentication calls are in the component Navbar.js

1 Like

Thank you! Weird that it has been working for the last month, the suddenly stopped but after I installed npm install @walletconnect/web3-provider, walletconnect works again!

However, Moralis.Plugins, Moralis.enable, Moralis.initPlugins are not recognized. Iā€™ve tried importing Moralis from moralis and through react-moralis.

Hopefully we find what is occurring

It used to be installed automatically, but about a month ago the SDK stopped doing it.

Make sure you donā€™t import Moralis twice

import { useMoralis } from "react-moralis";
import { Moralis } from "moralis";

function Navbar() {
  const { isInitialized} = useMoralis();
  useEffect(() => {
    if (isInitialized) {
      Moralis.initPlugins();
      const pluginList = Moralis.Plugins;
      console.log(pluginList);
    }
  }, [isInitialized]);
}

I suggest you to use new syntax. For calling web3API from react you need to use useMoralisWeb3Api()

Instead of Moralis.Web3.getERC20()

Thank you for these resources. Itā€™s almost 3am here so Ill read through tomorrow and get back to you! Can I ask how you made this appear in the console? Thanks again and goodnight image

const pluginList = Moralis.Plugins;
console.log(pluginList);

Something strange is going on lol. I used the same code and 1inch didnā€™t return for me despite that it did for you.

image

function ListPlugins() {

    const pluginList = Moralis.Plugins;
    const list = () => console.log(pluginList);
    
    return (
        <div>
            <button onClick={list}>List</button>
        </div>
    )
}

Have you initilized plugins?