Open DanielRuf opened 3 months ago
The documentation says this: const exporter = require('highcharts-export-server');
const exporter = require('highcharts-export-server');
But with the rest of the top-level awaits, we get this error:
SyntaxError: await is only valid in async functions and the top level bodies of modules
The whole code has to be wrappes as async IIFE.
Hi @DanielRuf,
Thanks for reporting this. Due to the logic changes and other factors, many functions are now asynchronous. I'll update the example presented in the README.
The documentation says this:
const exporter = require('highcharts-export-server');
But with the rest of the top-level awaits, we get this error:
SyntaxError: await is only valid in async functions and the top level bodies of modules
The whole code has to be wrappes as async IIFE.