Walletconnect/web3-provider" is missing

My code was working ideally before today. But now something is wrong, and it says “walletconnect/web3-provider” is missing."

index.html

<!DOCTYPE html>
<html>
  <head>
    <title>Vanilla Boilerplate</title>
    <script src="https://github.com/WalletConnect/walletconnect-monorepo/releases/download/1.6.2/web3-provider.min.js"></script>
    <script src="https://unpkg.com/moralis/dist/moralis.js"></script>
  </head>

  <body>
    <h1>Moralis Hello World!</h1>

    <button id="btn-login">Moralis Metamask Login</button>
    <button id="btn-logout">Logout</button>

    <script type="text/javascript" src="./main.js"></script>
  </body>
</html>

main.js

const serverUrl = "**************************************";
const appId = "**************************************";
Moralis.start({ serverUrl, appId });


/* Authentication code */

async function walletConect() {
    const user = await Moralis.authenticate({ 
        provider: "walletconnect", 
        chainId: 56,
        mobileLinks: [
          "rainbow",
          "metamask",
          "argent",
          "trust",
          "imtoken",
          "pillar",
        ] 
    })

    console.log(user);
}
1 Like

can you try with <script src="https://unpkg.com/[email protected]/dist/moralis.js"></script> ?

1 Like

It says, “You are not using the latest version of the SDK,” But now it is working perfectly. Thanks, Man. You saved my day. I am wondering why a new version of Moralis SDK Gives this error?

same problem here , with cryptokids answer the problem is solved… but still have otgher problems like Moralis.enable is not a function and stuff… onAccountsChanged is not a function… are there any problems with an update?

Same error of Hydracoder. Follow

there was a new version released today, that has some breaking changes: Moralis JS SDK v1.0 (migration to Ethers.js)

but version 0.0.184 should work as it worked before

1 Like

Yeah it works with the 0.0.184!