Mongoose connect is not a function... What is wrong?

adding “use server” worked for me.
Thanks @Tahir_Mansour .

1 Like