Moralis SDK installed from parts packages errors

Hi,

I’ve followed this guide to install only the packages that I need from moralis and when I try to do core.start({ apiKey }) I get this error:

MoralisError [Moralis SDK Core Error]: [C0013] Key "apiKey" is unregistered. Have you registered all required modules?

Any pointers with what am I missing?
You can find the example code on stackblitz.


Another issue that I’ve encountered and it’s not pointed in the Advanced guide is when trying to use something from evm-utils, eg. EvmChain.ETHEREUM I would get this error:

MoralisError [Moralis SDK Core Error]: [C0008] Default instance of MoralisCore is not set

And the way I solved it was to add MoralisCoreProvider.setDefault(core); after MoralisCore.create().


I assume I’m missing something in my setup and the guide is not up to date.
Thank you for your help

Hey @gabdara, hope you are doing well. Could you fix the error so far, I’m getting the same error.

import { MoralisAuth } from '@moralisweb3/auth'
import { MoralisCore } from '@moralisweb3/core'

let core = MoralisCore.create()
let instance = MoralisAuth.create(core)

await instance.requestMessage({ ... })

I haven’t found a fix so far. Reverted back to using the monolith package so I can continue.