Open
Description
I'm using Highcharts with NextJS and when trying to update to Highcharts v12, I get the following error:
web:build: ✓ Compiled successfully
Collecting page data .TypeError: Cannot read properties of undefined (reading 'createEvent')
web:build: at j (/project/node_modules/.pnpm/[email protected]/node_modules/highcharts/highcharts.js:9:2038)
web:build: at setOptions (/project/node_modules/.pnpm/[email protected]/node_modules/highcharts/highcharts.js:9:16987)
web:build: at Object.compose (/project/node_modules/.pnpm/[email protected]/node_modules/highcharts/highcharts-more.js:9:23390)
From my research, it seems that this issue might be caused by trying to instance a chart on the server-side, which didn't seem to happen before.
While looking at the README of the project, I noticed that the following section was updated with a comment to only init modules if the Highcharts version is below v12.
Lines 423 to 436 in 11c276d
However, the NextJS section still says the module should be initiated:
Lines 140 to 155 in 11c276d
Which approach should be followed for NextJS? Could the server-side instance attempt be caused by something else?
Metadata
Metadata
Assignees
Labels
No labels