[SOLVED] runContractFunction is not a function

I am getting the above error when running the function below

const buyItem=async()=>{
const tokenAbi = WETHABI

      const tokenAddress = "0xc778417E063141139Fce010982780140Aa0cD5Ab"

      const approveTokenOptions = {

        abi: tokenAbi,

        contractAddress: tokenAddress,

        functionName: "approve",

        params: {

            spender: marketplaceAddress,

            amount: allowance,

        },

    }

      const tokenApp = await runContractFunction({

          params: approveTokenOptions,

          onError: (error) => {

              console.log(error)

          },

      })
}

solved - thank you all

How did you solve it? I don’t see a solution

it could be that runContractFunction was not imported and it was not recognised as a function