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

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?