I’m having an issue with the Cloud functions. I’ve distilled it down and it appears that web3 is not getting enabled. What am I doing wrong here? This is a new Moralis server I just created tonight… I do not see this issue on an older test server I have.
I’ve created a simple test function to demonstrate the error
Moralis.Cloud.define('testWeb3', async (request) => {
const web3 = Moralis.web3ByChain("0x1");
return {version: web3.version}
});
and I call it with the following
try {
cloud = await Moralis.Cloud.run('testWeb3');
console.log("test returned:", cloud);
} catch (error) {
console.log(error)
}
and this results in
Error: Could not find provider
at handleError (moralis.js:26097:17)
at async main.js:1484:12
at async HTMLDocument.<anonymous> (main.js:1474:3)