Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

261
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!