Unhandled Rejection (TypeError): Moralis.start is not a function

error

Unhandled Rejection (TypeError): moralis__WEBPACK_IMPORTED_MODULE_1__.Moralis.start is not a function

need help

code

ReactDOM.render(
      <MoralisProvider
          appId=""
          serverUrl=""
      >
      <App />
      </MoralisProvider>,
  document.getElementById('root')
);
1 Like

Hey @JorSoSad

Please update your moralis and react-moralis versions.

Try to add axios: npm install axios --save
Let me know what versions you had and how it will work for you :raised_hands:

or you can for example use earlier versions

Thank you for your quickly reply

This is my dependencies in package.json

     "axios": "^0.23.0",
    "moralis": "0.0.68",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-moralis": "^0.2.6",
    "react-scripts": "4.0.3",
    "web-vitals": "^1.0.1"

after add axios, still error

Iโ€™m a bit confused, is it a full code you used?

Moralis SDK 0.0.68 doesnโ€™t have the new Moralis.start syntax, that was added starting with Moralis SDK version 0.0.80

2 Likes

sorry for your confuse

ReactDOM.render(
      <MoralisProvider
          appId="My App Id"
          serverUrl="My Server Url"
      >
      <App />
      </MoralisProvider>,
  document.getElementById('root')
);

I mean, is this the only code youโ€™ve used or not? Because I see on the screen you have hooks. I just wasnโ€™t sure if it was yours or sdk

Yes, as @cryptokid mentioned Moralis.start() is not supported on 0.0.68.

It works! Thank you.

You save my day

@Yomoo you too, thank you.

1 Like