Package path ./providers/credentials is not exported from package


I’m using next-auth v5, and it seems that MoralisNextAuthProvider() isn’t being accepted as provider when trying to configure the auth.ts file:

import { MoralisNextAuthProvider } from '@moralisweb3/next'
import { nanoid } from 'nanoid'
import NextAuth from 'next-auth'

export const { handlers, signIn, signOut, auth } = NextAuth({
  providers: [MoralisNextAuthProvider()],
  pages: {
    signIn: '/',
    error: '/404',
    signOut: '/'
  session: {
    strategy: 'jwt'
  callbacks: {
    jwt: async ({ token, user }: any) => {
      user && (token.user = user)

      return token

Module not found: Package path ./providers/credentials is not exported from package C:\Users\user\Documents\GitHub\project\node_modules\next-auth (see exports field in C:\Users\user\Documents\GitHub\project\node_modules\next-auth\package.json)

Import trace for requested module:

Thanks for your help!

Hi @NeckRawfeel

I dont think MoralisNextAuthProvider is meant to be used like that. Are you referring to any documentation for this?

Next auth only accepts certain web2 providers.