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

Cannot add series-on-point module to the export server #532

Closed
hubaksis opened this issue May 30, 2024 · 3 comments · Fixed by #534
Closed

Cannot add series-on-point module to the export server #532

hubaksis opened this issue May 30, 2024 · 3 comments · Fixed by #534
Assignees
Labels

Comments

@hubaksis
Copy link

Expected behaviour

Module series-on-point is loaded and used for drawing pies on maps when environment variable HIGHCHARTS_MODULE_SCRIPTS is set to 'series-on-point'

Actual behaviour

Module is not loaded during the container start process

Reproduction steps

my docker file.

FROM node:lts-alpine
ENV NODE_ENV=production
ENV HIGHCHARTS_VERSION=11.4.3
ENV SERVER_ENABLE='true'
ENV SERVER_PORT=8080
ENV HIGHCHARTS_MODULE_SCRIPTS='series-on-point'

RUN apk add --no-cache \
      chromium \
      nss \
      freetype \
      harfbuzz \
      ca-certificates \
      ttf-freefont \
      nodejs \
      yarn \
      git

ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
# RUN npm install highcharts-export-server -g

USER root
WORKDIR /

RUN git clone https://github.com/highcharts/node-export-server.git && \
    chown -R node /node-export-server

WORKDIR /node-export-server

USER node 

ENV ACCEPT_HIGHCHARTS_LICENSE="YES" HIGHCHARTS_MOMENT="1"

RUN rm package-lock.json && \
    npm install -S  moment moment-timezone && \
    npm install

USER root
RUN npm link --unsafe-perm

WORKDIR /node-export-server

# COPY . .
# RUN chown -R node /usr/src/app
# USER node

USER node
WORKDIR /node-export-server

EXPOSE 8080
ENTRYPOINT ["highcharts-export-server", "--enableServer", "1", "--port","8080"]

When container starts, only default modules are loaded

2024-05-30 15:14:42     __  __        __         __              __                           
2024-05-30 15:14:42    / / / /_ ___  / /_  _____/ /_  ____  ____/ /_ ____                     
2024-05-30 15:14:42   / /_/ / / __ \/ __ \/ ___/ __ \/ __ \/ __/ __/ ___/                     
2024-05-30 15:14:42  / __  / / /_/ / / / / /__/ / / / /_/ / / / /_(__  )                      
2024-05-30 15:14:42 /_/ /_/_/\__  /_/ /_/\___/_/ /_/\__,_/_/  \__/____/                       
2024-05-30 15:14:42         ___/ /                     __     _____                           
2024-05-30 15:14:42        / ___/_  _ ____  ____  ____/ /_   / ___/___  _____   __ __  ____   
2024-05-30 15:14:42       / __/ | |/ / __ \/ __ \/ __/ __/   \__ \/ _ \/ __/ | / / _ \/ __/   
2024-05-30 15:14:42      / /___ >  </ /_/ / /_/ / / / /_    ___/ /  __/ /  | |/ /  __/ /      
2024-05-30 15:14:42     /_____/_/|_/ ____/\____/_/  \__/   /____/\___/_/   |___/\___/_/       
2024-05-30 15:14:42               /_/                                                         
2024-05-30 15:14:42                                                                      v4.0.0
2024-05-30 15:14:42 
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [notice] - [process] Attaching exit listeners to the process.
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [notice] - [cache] Fetching and caching Highcharts dependencies.
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [notice] - [cache] Updating cache version to Highcharts: 11.4.3/.
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/highcharts.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/highcharts-more.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/highcharts-3d.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/stock.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/maps/11.4.3/modules/map.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/gantt.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/exporting.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/export-data.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/parallel-coordinates.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/accessibility.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/boost-canvas.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/boost.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/data.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/data-tools.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/draggable-points.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/static-scale.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/broken-axis.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/heatmap.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/tilemap.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/tiledwebmap.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/timeline.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/treemap.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/treegraph.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/item-series.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/drilldown.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/histogram-bellcurve.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/bullet.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/funnel.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/funnel3d.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/geoheatmap.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/pyramid3d.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/networkgraph.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/overlapping-datalabels.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/pareto.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/pattern-fill.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/pictorial.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/price-indicator.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/sankey.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/arc-diagram.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/dependency-wheel.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/series-label.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/solid-gauge.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/sonification.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/streamgraph.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/sunburst.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/variable-pie.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/variwide.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/vector.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/venn.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/windbarb.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/wordcloud.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/xrange.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/no-data-to-display.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/drag-panes.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/debugger.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/dumbbell.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/lollipop.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/cylinder.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/organization.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/dotplot.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/marker-clusters.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/hollowcandlestick.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/heikinashi.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/11.4.3/modules/flowmap.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://code.highcharts.com/stock/11.4.3/indicators/indicators-all.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js
2024-05-30 15:14:42 Thu May 30 2024 03:14:42 GMT+0000 [verbose] - [cache] Fetching script - https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.34/moment-timezone-with-data.min.js
2024-05-30 15:14:43 Thu May 30 2024 03:14:43 GMT+0000 [notice] - [cache] Writing a new manifest.
2024-05-30 15:14:43 Thu May 30 2024 03:14:43 GMT+0000 [notice] - [browser] Attempting to get a browser instance (try 1).
2024-05-30 15:14:43 Thu May 30 2024 03:14:43 GMT+0000 [notice] - [browser] Launched browser in shell mode.
2024-05-30 15:14:43 Thu May 30 2024 03:14:43 GMT+0000 [notice] - [pool] Initializing pool with workers: min 4, max 8.
2024-05-30 15:14:43 Thu May 30 2024 03:14:43 GMT+0000 [notice] - [pool] Successfully created a worker b5b2234f-2efa-4469-818f-ba4e0c4c736f - took 392 ms.
2024-05-30 15:14:43 Thu May 30 2024 03:14:43 GMT+0000 [notice] - [pool] Successfully created a worker 2d80a542-c7ae-4c88-ab21-95cd8fd113cd - took 280 ms.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [notice] - [pool] Successfully created a worker e51e8f93-4238-4061-9d92-8c045d394ffb - took 293 ms.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [notice] - [pool] Successfully created a worker 5785961f-dca7-4e72-ba7c-8810ac045726 - took 341 ms.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [notice] - [pool] The pool is ready with 4 initial resources waiting.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [notice] - [server] Started HTTP server on 0.0.0.0:8080.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [verbose] - [pool] Releasing a worker with ID b5b2234f-2efa-4469-818f-ba4e0c4c736f.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [verbose] - [pool] Releasing a worker with ID 5785961f-dca7-4e72-ba7c-8810ac045726.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [verbose] - [pool] Releasing a worker with ID e51e8f93-4238-4061-9d92-8c045d394ffb.
2024-05-30 15:14:44 Thu May 30 2024 03:14:44 GMT+0000 [verbose] - [pool] Releasing a worker with ID 2d80a542-c7ae-4c88-ab21-95cd8fd113cd.


@hubaksis
Copy link
Author

hubaksis commented May 30, 2024

Ok, after some research I figured that there is a file lib/schemas/config.js which contains Possible names for Highcharts scripts.
I assume adding 'series-on-point' to the module list should solve the issue.

Is there a reason why this module is not in the default list?

Update: this is a very dirty hack. I hope there is a more elegant solution to this.

This is my workaround. Edit config.js from a dockerfile. The code replaces flowmap to flowmap','series-on-point

FROM node:lts-alpine
ENV NODE_ENV=production
ENV HIGHCHARTS_VERSION=11.4.3

RUN apk add --no-cache \
      chromium \
      nss \
      freetype \
      harfbuzz \
      ca-certificates \
      ttf-freefont \
      nodejs \
      yarn \
      git

ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

USER root
WORKDIR /

RUN git clone https://github.com/highcharts/node-export-server.git && \
    chown -R node /node-export-server

WORKDIR /node-export-server

USER node 

RUN rm package-lock.json && \
    npm install -S  moment moment-timezone && \
    npm install

USER root
RUN npm link --unsafe-perm

WORKDIR /node-export-server


USER node
WORKDIR /node-export-server


RUN sed -i "s/flowmap/flowmap','series-on-point/g" lib/schemas/config.js

EXPOSE 8080
ENTRYPOINT highcharts-export-server --enableServer 1 --port 8080


@jszuminski jszuminski self-assigned this Jun 4, 2024
@jszuminski jszuminski added the bug label Jun 4, 2024
@jszuminski
Copy link
Contributor

Thanks for reporting @hubaksis!

I'm currently investigating & taking care of this issue. Will keep you posted here.

@jszuminski
Copy link
Contributor

@hubaksis I've created a pull request solving this issue which should also be a part of the upcoming release so expect this to be fixed soon 🫡

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.

2 participants