highcharts / highcharts/node-export-server

Unable to setup export server in node application with npm package highcharts-export-server v3.0.3 and above

Open
#494 1 comment 1 reaction 0 assignees View on GitHub
bug only json
Dominant language
JavaScript
Stars
369
Forks
266
PR merge metrics
No merged PRs in 30d

Description

We are using npm package `highcharts-export-server `in our express based server.
Axis label is not getting translated as per selected lang, this is same as https://github.com/highcharts/node-export-server/issues/434 which is fixed and released in 3.0.3 version but while we are using version 3.0.3 or above, we are getting error while starting the server. We drilled more into the code and found it is happening because coreScript is undefined.
`TypeError: Cannot read properties of undefined (reading 'map').`

After that server got started with this above error and we tried to export the chart and got another error
```
Tue Mar 19 2024 23:06:31 GMT+0530 [verbose] - [chart] Starting exporting process.
Tue Mar 19 2024 23:06:31 GMT+0530 [verbose] - [chart] Attempting to export from a raw input.
TypeError: Cannot read properties of undefined (reading 'allowCodeExecution')

```
This is the request body we are passing and below are the configurations.
```
NODE_TLS_REJECT_UNAUTHORIZED=0
ACCEPT_HIGHCHARTS_LICENSE=1
HIGHCHARTS_ALLOW_CODE_EXECUTION=1
HIGHCHARTS_ALLOW_FILE_RESOURCES=1
HIGHCHARTS_LOG_LEVEL=2
```

```
await exporter.initPool({
maxWorkers: 5,
initialWorkers: 5,
workLimit: 50,
customCode: { allowCodeExecution: true, allowFileResources: true },
});
```
The same configuration is working fine in npm `highcharts-export-server v3.0.1` with translation issue.

Can someone please help me here to unblock me.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.