How to start Moralis with version 2 for call Cloud functions?
My code:
Moralis.start({
apiKey: process.env.NEXT_PUBLIC_MORALIS_STREAM_API_KEY,
});
const {message} = await Moralis.Cloud.run('requestMessage', {
address: address,
chain: EvmChain.ETHEREUM,
network: 'evm',
});
But get error: TypeError: Cannot read properties of undefined (reading โrunโ)
Why Moralis.Cloud was undefined ?