Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

259
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda