taxonomy
taxonomy copied to clipboard
Can't deploy Taxonomy to Vercel
I tried to deploy Taxonomy on Vercel, I filled every environment variable, including NextAuth, Github, Stripe, Postmark and Planetscale, it works on my local machine, both development and build are OK, no console errors or warnings, but when I deploy it to Vercel, I always get the same error and I don't know how to debug it. Can you help me please?

"Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error. ur @ 1038-8ac05e91eb48cd01.js:9"
Not sure if it's the same reason but I've found this from an error being thrown by unstable_getServerSession in the ContentLayer enabled area. Worked around it by redoing the getSession function, although it just means I can't have an auth'ed state in docs.
export const getSession = async (): Promise<Session | null> => {
try {
return await unstable_getServerSession(authOptions);
} catch (error) {
return null;
}
};
@gamekaiju Is this happening on all routes?
@gamekaiju Is this happening on all routes?
Yes, it is, in all routes.
export const getSession = async (): Promise<Session | null> => { ... }
I don't see why Promise<Session | null> is required. Other than that...
export async function getSession() {
try {
return await unstable_getServerSession(authOptions)
} catch (error) {
return null
}
}
...confirmed as a workaround.
export const getSession = async (): Promise<Session | null> => { ... }
I don't see why
Promise<Session | null>is required. Other than that...export async function getSession() { try { return await unstable_getServerSession(authOptions) } catch (error) { return null } }...confirmed as a workaround.
Not required, I just have a hella strict linter setup 😅
Not required, I just have a hella strict linter setup sweat_smile
Than you very much Hayden. Great work!