Hello I am trying to use
and everything looks ok till i run the server i get this error
error - SerializableError: Error serializing .page
returned from getStaticProps
in “/[[…pages]]”.
Reason: undefined
cannot be serialized as JSON. Please use null
or omit this value.
and this is the code for the static props
export async function getStaticProps({
params,
}: GetStaticPropsContext<{ pages: string, locale: string }>) {
const page = await getPages(params?.pages)
return {
props: {
page,
locale: ‘en-US’,
},
revalidate: 24 * 60 * 60 * 60 // 1 día
}
}
i cant figure out whats tossing the error unless i am fully over seeing something