When attempting to implement NextAuth into my Typescript application, I encounter two errors: one with NextAuth and the other with NextAuthOptions.
import NextAuth from "next-auth"
import { NextAuthOptions } from "next-auth"
import GoogleProvider from "next-auth/providers/google";
export const authOptions: NextAuthOptions = ({
providers: [
GoogleProvider({
clientId: `${process.env.GOOGLE_CLIENT_ID}`,
clientSecret: `${process.env.GOOGLE_CLIENT_SECRET}`,
})
]
})
const handler = NextAuth(authOptions)
export { handler as GET, handler as POST }
The error "Module '"next-auth"' has no exported member 'NextAuthOptions'.ts(2305)" is displayed.
Additionally, the error "This expression is not callable. Type 'typeof import("next-auth")' has no call signatures." appears.