Problem upgrading to v2

I’m trying to upgrade to v2, but I keep getting this error:

Moralis SDK Core Error: [C0013] Key “appId” is unregistered. Have you registered all required modules?

I’m using Vue3 and that happens when I call Moralis.start({ appId }); // appId is a constant

I don’t know what you did, this works in node js:

Moralis = require("moralis").default
const address = '423424';
const chain = 0x1;


const x = async () => {

    await Moralis.start({
        apiKey: '523235',
    });

    const response = await Moralis.EvmApi.account.getNFTTransfers({
        address,
        chain,
    });
    console.log(response);

}

x()
1 Like