[C0013] Key "serverUrl" is unregistered. Have you registered all required modules?

Hello, I’ve tried to use the Moralis with the local hardhat newtwork, but there is an error.

const Moralis = require("moralis").default;
Preformatted textconst { MORALIS_API_KEY } = process.env;
const moralisConfig = {
  SERVER_: 'http://localhost:8545',

await Moralis.start(moralisConfig);
const response = await Moralis.EvmApi.transaction.getTransaction({
  chain: CHAIN_ID,
  transactionHash: deployment_tx_hash

I’ve tried with serveral ways using serverURL, server and serverUrl, but the error is still remain.
How to solve this problem?

Hi @ethermain

Moralis sdk no longer supports the local dev environment. We have depreciated the server urls in favour of API’s.

Please have a look at the latest docs for more details on the new API endpoint and SDK.

Feel free to reply if you have any questions

thanks for your support, @johnversus
I used Moralia to interact the contract that deployed to the sepolia
but now I have to interact the contract that deployed to the local hardhat network, so what can I do for it?

It is not possible to interact with local hardhat networks using the Moralis API. You will have to directly use the ether.js or web3.js.