title: HighCharts Sankey + NextJS: TypeError: Cannot read property 'Core/Series/Point.js' of undefined
body: <p>I am trying to render a <a href="https://www.highcharts.com/demo/sankey-diagram" rel="nofollow noreferrer">HighCharts Sankey</a> chart using <a href="https://github.com/highcharts/highcharts-react" rel="nofollow noreferrer">HighCharts React</a> and <a href="https://nextjs.org/" rel="nofollow noreferrer">NextJS</a>. I've followed HighChart's documentation on how to add the Sankey module, but the page fails with this error:</p>
  <pre><code>TypeError: Cannot read property 'Core/Series/Point.js' of undefined
  </code></pre>
  <p>The error seems to occur at the <code>addSankeyModule</code>, before the chart is actually initialized. Below is my module code:</p>
  <pre><code>import React from &quot;react&quot;
  import Highcharts from &quot;highcharts&quot;
  import HighchartsReact from &quot;highcharts-react-official&quot;
  import addSankeyModule from &quot;highcharts/modules/sankey&quot;
  
  addSankeyModule(Highcharts)
  
  const options = {
        // omitted for brevity
  }
  
  const DependenciesChart: React.FC = () =&gt; (
        &lt;HighchartsReact highcharts={Highcharts} options={options} /&gt;
  )
  
  export default DependenciesChart
  
  </code></pre>