Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

RangeError: toPrecision() argument must be between 1 and 100

Open
#657 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, javascript, node.js
Domain
api, backend, devops

Research direction

Reproduce the example curl request from the issue using the supplied Dockerfile, then inspect the triggerExport stack location in node_modules/highcharts-export-server/lib/export.js:157. Compare the request data and dependency/runtime versions around the failing call; done means the example export completes without the RangeError.

Written by the indexing model from the issue text.

Description

Hello people,

I'm currently try to setup the server with Docker.

Error Message when try the example test curl request: curl -H "Content-Type: application/json" -X POST -d '{"infile":{"title": {"text": "Chart"}, "xAxis": {"categories": ["Jan", "Feb", "Mar"]}, "series": [{"data": [29.9, 71.5, 106.4]}]}}' 127.0.0.1:7801:

highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] Got an incoming HTTP request with ID 05520c7efe38433785a289f6a7fb6ceb.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [chart] Starting the exporting process.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [chart] Attempting to export from a raw input.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Work received, starting to process.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Acquiring a worker handle.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Acquired a worker handle.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Starting work on pool entry with ID c048d55b-c456-4b80-8d7a-1550f76b44b7.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] Determining export path.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] Treating as config.
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [export] The current total size of data passed to a page is around 0.00 MB
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [error] - [pool] In pool.postWork: For request with ID 05520c7efe38433785a289f6a7fb6ceb - Error encountered during export: 30.137292ms. 
highcharts-export-server-1  |  RangeError: toPrecision() argument must be between 1 and 100
highcharts-export-server-1  |     at triggerExport (evaluate at setAsConfig (file:///home/pptruser/node_modules/highcharts-export-server/lib/export.js:157:15), <anonymous>:94:20)
highcharts-export-server-1  |     at #evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:383:19)
highcharts-export-server-1  |     at async ExecutionContext.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:270:16)
highcharts-export-server-1  |     at async IsolatedWorld.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js:96:16)
highcharts-export-server-1  |     at async CdpFrame.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.js:335:20)
highcharts-export-server-1  |     at async CdpPage.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:799:20)
highcharts-export-server-1  |     at async default (file:///home/pptruser/node_modules/highcharts-export-server/lib/export.js:224:9)
highcharts-export-server-1  |     at async postWork (file:///home/pptruser/node_modules/highcharts-export-server/lib/pool.js:328:20)
highcharts-export-server-1  |     at async doExport (file:///home/pptruser/node_modules/highcharts-export-server/lib/chart.js:438:20)
highcharts-export-server-1  |     at async exportHandler (file:///home/pptruser/node_modules/highcharts-export-server/lib/server/routes/export.js:225:5)
highcharts-export-server-1  | Tue May 06 2025 13:15:34 GMT+0000 [verbose] - [pool] Releasing a worker with ID c048d55b-c456-4b80-8d7a-1550f76b44b7. Clear page status: true.

I'm already tried different Node versions and HighChart versions but always I've got the toPrecision error but I can't find anything in this direction. I've also tried google-chrome-stable.

Has somebody an idea?

Dockerfile:

FROM node:22

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium
ENV HIGHCHARTS_VERSION=11

RUN apt-get update \
    && apt-get install -y chromium \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY ./deploy/highcharts/fonts/ /usr/share/fonts/truetype/

RUN fc-cache -fv

RUN groupadd -r pptruser && useradd -r -g pptruser pptruser \
    && mkdir -p /home/pptruser/Downloads \
    && chown -R pptruser:pptruser /home/pptruser

USER pptruser

WORKDIR /home/pptruser

RUN npm install highcharts-export-server

EXPOSE 7801

ENTRYPOINT ["node", "/home/pptruser/node_modules/highcharts-export-server/bin/cli.js", "--enableServer", "1"]
Dominant language
JavaScript
Stars
368
Forks
265
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from highcharts/node-export-server

All issues in highcharts/node-export-server

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.