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 · May be fixed by #565
Open

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

DanielRuf opened this issue Aug 6, 2024 · 1 comment · May be fixed by #565
Assignees
Labels

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.

@PaulDalek PaulDalek linked a pull request Aug 6, 2024 that will close this issue
PaulDalek added a commit that referenced this issue Aug 6, 2024
PaulDalek added a commit that referenced this issue Nov 25, 2024
@PaulDalek PaulDalek linked a pull request Nov 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants