t3 getServerSideProps returns

After adding
export async function getServerSideProps(
context: GetServerSidePropsContext
): Promise<GetServerSidePropsResult<{ session: Session | null }>> {
return {
props: {
session: await unstable_getServerSession(
context.req,
context.res,
authOptions
),
},
}
}
export async function getServerSideProps(
context: GetServerSidePropsContext
): Promise<GetServerSidePropsResult<{ session: Session | null }>> {
return {
props: {
session: await unstable_getServerSession(
context.req,
context.res,
authOptions
),
},
}
}
To my Layout component, I get following error:
Failed to compile
./node_modules/.pnpm/openid-client@5.3.0/node_modules/openid-client/lib/helpers/deep_clone.js:1:33
Module not found: Can't resolve 'v8'
Failed to compile
./node_modules/.pnpm/openid-client@5.3.0/node_modules/openid-client/lib/helpers/deep_clone.js:1:33
Module not found: Can't resolve 'v8'
Currently I have no idea why that error occurs
1 Reply
utdev
utdevOP3y ago
Securing pages and API routes | NextAuth.js
You can easily protect client and server side rendered pages and API routes with NextAuth.js.
Want results from more Discord servers?
Add your server