I managed to deploy my Nextjs app (whith getStaticProps + i18n + firebase) on Vercel. But i get a blank screen. Here's the log:
Status: 200
Duration: 8.18ms
Memory Used: 111 MB
I tried :
I also tried:
Any idea?
My mistake. It was a problem with my getServerSideProps code
To this :
export async function getServerSideProps({ req, res }) {
const data = cookie.parse(req ? req.headers.cookie || "" : document.cookie);
if (res) {
if (Object.keys(data).length === 0 && data.constructor === Object) {
res.end();
}
}
return {
props: { userId: data.userId }, // will be passed to the page component as props
};
}
I went to this:
export async function getServerSideProps({ req, res }) {
const data = cookie.parse(req ? req.headers.cookie || "" : document.cookie);
return {
props: { userId: data.userId }, // will be passed to the page component as props
};
}
The res.end(); was the problem.