Your server is not initilazed properly.
const serverUrl = "https://xxxxx/server";
const appId = "YOUR_APP_ID";
Moralis.start({ serverUrl, appId });
This is the way you do it nowadays. Make sure to update your Server in the moralis dashboard and to have the latest moralis npm package installed!