I have a Next Js app that has pages with getServerSideProps. I'm now trying to npm run build and npm export it so I can get the 'Out' Folder and host it on firebase but in the process of doing so I get the error pages with "getServerSideProps" can not be exported
getServerSideProps
export async function getServerSideProps(context) {
const providers = await getProviders();
const session = await getSession(context);
return {
props: {
providers,
session,
},
};
}
Package.json
"scripts": {
"dev": "next dev",
"build": "next build && next export",
"start": "next start"
}