verbal-limeV
Refine3y ago
19 replies
verbal-lime

Compile error next-auth

Generated project: Nextjs + Ant Design+ Hasura + Auth0. Unzipped, npm install, npm run dev and failed to compile. Some workeround seems to be add next-auth package to list of transpilePackages in next.config.js but I'm not sure if it's expected behaviour.
anyway it will compile but then throws an error :
Unhandled Runtime Error
Error: React Context is unavailable in Server Components
Call Stack
SessionProvider
node_modules/next-auth/react/index.js (451:10)

I've tried also with GoogleAuth, ChakraUI... this same. Only working solution was without authorisation (without next-auth) I'm on Mac, node v19.9, npm 9.6.3.
image.png
Was this page helpful?