Module not found: Can't resolve 'process' - When using SessionProvider in _app.tsx #4473
Unanswered
reply2sagar
asked this question in
Help
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
System:
OS: Windows 10 10.0.19044
CPU: (4) x64 AMD A4-6210 APU with AMD Radeon R3 Graphics
Memory: 2.45 GB / 10.96 GB
Binaries:
Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 100.0.4896.127
Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.44)
Internet Explorer: 11.0.19041.1566
npmPackages:
next: 12.1.4 => 12.1.4
next-auth: ^4.3.3 => 4.3.3
react: 18.0.0 => 18.0.0
Reproduction URL
Project is not public
Describe the issue
I am trying to use next-auth in existing nextjs project.
Here is my _app.tsx file
`import { SessionProvider } from "next-auth/react"
import '../styles/globals.css'
function MyApp({ Component, pageProps }) {
return (
<Component {...pageProps} />
)
}
export default MyApp`
When I start the server, I get error saying "error - ./node_modules/next-auth/react/index.js:70:0
Module not found: Can't resolve 'process'
Import trace for requested module:
./pages/_app.tsx"
How to reproduce
Try to integrate the auth-next in existing project
Expected behavior
Compilation error should not be shown. Instead I should be able to use sessions.
Beta Was this translation helpful? Give feedback.
All reactions