Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

266
Vistas
Module not found: Package path ./react is not exported from package E:\NextApp\portfolio_website-main\portfolio_website-main\node_modules\next-auth

I can't import SessionProvider from Next-Auth. While importing it's showing this error.

"Module not found: Package path ./react is not exported from package E:\NextApp\portfolio_website-main\portfolio_website-main\node_modules\next-auth"

here is my code:(_app.js)

import { SessionProvider } from "next-auth/react"

export default function App({Component, pageProps: { session, ...pageProps }}) {
  return (
    <SessionProvider session={session}>
      <Component {...pageProps}/>
    </SessionProvider>
  )
}
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

you might be on v3 where next-auth/client is still in use. Either import that or run npm i next-auth@beta to use v4

about 4 years ago · Juan Pablo Isaza Denunciar

0

I had the same issue and manage to fix it. Basically, There is a bad version of Next Auth out there so to avoid it, remove the ^ symbol before the version number in your package.json file

You can see the warning in the documentation here.

So the next-auth line in your package.json should read like this:

{
  ...
  "dependencies": {
    ...
    "next-auth": "4.0.0-beta.4",
    ...
  }
}

Instead of this:

{
  ...
  "dependencies": {
    ...
    "next-auth": "^4.0.0-beta.4",
    ...
  }
}

After you have done that make sure to run npm i or yarn to ensure the packages are updated.

That should fix your issue although I am now getting a getSessionAndUser is not a function Type error 😱

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda