I have a hosted next.js website at https://chipper-kringle-058ff5.netlify.app/
The home page has a getServerSideProps where I fetch some data from a mysql database using prisma.
export const getServerSideProps = (async () => {
const projects = await db.portfolioProjects.findMany({
orderBy: {
order: "asc",
},
});
return {
props: {
projects: JSON.parse(
JSON.stringify(projects),
) as PortfolioProjects[],
},
};
}) satisfies GetServerSideProps<{
projects: PortfolioProjects[];
}>;
But for some reason, the page just displayes Internal Server Error, with no logs displayed anywhere.
There are no build issues, and when the project is deployed at Vercel, it works just fine.
I tried removing the data fetching from getServerSideProps
, in case that prisma has had issues with being used on getServerSideProps
, but it had no effect.
The only way the page currently works is when I completely remove getServerSideProps
. Other pages that don’t use getServerSideProps
work correctly.
Any help would be appreciated, thanks.