Cannot start Moralis on Node.js

I have initialised a dapp on the moralis dashboard and wish to start using it through node.js. I’m bootstrapping using the starter as given in the docs. The same code was working yesterday but fails to work today.

const Moralis = require("moralis/node")

let moralisServerUrl = "<REDACTED>"
let moralisAppId = "<REDACTED>"
let moralisMasterKey = "<REDACTED>"

const main = async () => {
    await Moralis.start({ moralisServerUrl, moralisAppId, moralisMasterKey });
}

main()

Running $ node main.js gives me the following error:

throw new Error('Web3Api.initialize failed: initialize with apiKey or serverUrl');

Am I starting the server incorrectly?

what version of Moralis SDK are you using?

here you have to use the exact expected name for those variables, not some modified names

1 Like

Ahh, of course. Thank you!