Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4: outdated example for Node.js module usage #563

Open
DanielRuf opened this issue Aug 6, 2024 · 1 comment
Open

v4: outdated example for Node.js module usage #563

DanielRuf opened this issue Aug 6, 2024 · 1 comment
Assignees

Comments

@DanielRuf
Copy link

DanielRuf commented Aug 6, 2024

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.

@PaulDalek PaulDalek self-assigned this Aug 6, 2024
@PaulDalek
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants