Build error: Cannot read properties of undefined
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
When I build my Next.js app, I get an error: "TypeError: Cannot read properties of undefined (reading 'QuizData')". QuizData is a property of GeoQuiz:
My quiz page tries to dynamically load a quiz from a GeoQuiz object. I'm using generateStaticParams() to pre-render all routes. Does anyone know how to fix this?
export type GeoQuiz = {
Map: React.ReactNode,
UrlComponent: string,
Names: {label:string,langISO639_1:string}[],
LanguagesISO639_1: string[],
Descriptions: {label:string,langISO639_1:string}[],
Keywords: string[],
QuizData: {id:string,labels:{label:string,langISO639_1:string}[]}[]
}
My quiz page tries to dynamically load a quiz from a GeoQuiz object. I'm using generateStaticParams() to pre-render all routes. Does anyone know how to fix this?