./node_modules/typescript/lib/typescript.js Critical dependency: the request of a dependency is an expression

I am getting this error. It came out of nowhere so it seems it has to do with a moralis/typescript. Kindly direct me.
Screenshot from 2024-03-11 04-52-59

Module not found: Can’t resolve ‘perf_hooks’ in ‘~/node_modules/typescript/lib’

seems the error comes from moralis-v1

Hi @CleanMcGerk

For using […moralis].ts you will need the moralis sdk package not the moralis-v1 package.

Can you please try again with the latest package?

I have both. Its been working it just stopped for some reason. I installed the moralis-v1 so I could executeFunction

my moralis.ts file

import { MoralisNextApi } from "@moralisweb3/next";

export default MoralisNextApi({
  apiKey: process.env.MORALIS_API_KEY,


my moralis version is 2.25.1 which is the latest.

managed to solve by updating my node version

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.