Property 'executeFunction' does not exist on type 'typeof Moralis'

Hi
I’m trying to use moralis and call a function but I get this error. I checked the moralis and react-moralis version in package.json and it’s ok.
Do you know what’s the reason of this error?

import Moralis from 'moralis';
.
.
.
const getCA = async () => {

        const getAddress = await Moralis.executeFunction(options);

        console.log(getAddress );

        return getAddress ;

    }

what type of project is it?

anything else works from Moralis, for example this works? Moralis.CoreManager.get("VERSION")

Yes I don’t get error for that.

It’s a react project

maybe it is only a type error then?

but the app stops rendering due to this error

I mean maybe you can use a syntax that skips type checks like as any

I tried @ts-ignore
but again I get this error:
Property ‘executeFunction’ does not exist on type ‘typeof Moralis’.

did you try with:

import { Moralis } from "moralis";
const Moralis = require("moralis");

import { useMoralis } from "react-moralis";
const { Moralis } = useMoralis();

I had tried all except require(“moralis”) which worked. Thank you :slight_smile:
Can you tell me why the others don’t work?

I don’t know why the others don’t work