highcharts / highcharts/node-export-server

Using PM2 with highcharts-export-server in Windows does not work

Open
#348 1 comment 0 reactions 1 assignee Claimed by @PaulDalek View on GitHub
environment issue help wanted
Dominant language
JavaScript
Stars
369
Forks
266
PR merge metrics
No merged PRs in 30d

Description

In the documentation for [highcharts-export-server][1] : it says that you should use [PM2 ][2] to run it as a server but I just can't get this to work on my Windows machine.

I have no problem to run it from the command line :

highcharts-export-server --enableServer 1

However when I run :

pm2 start highcharts-export-server -- --enableServer 1

I get :

[PM2] Applying action restartProcessId on app [highcharts-export-server](ids: [ 0 ])
[PM2] [highcharts-export-server](0) ✓
[PM2] Process successfully started
┌─────┬─────────────────────────────┬─────────────┬─────────┬─────────┬──────────┬─────── ─┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼─────────────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ highcharts-export-server │ default │ N/A │ fork │ 13916 │ 0 │ 50 │ stopped │ 0% │ 0b │ │ disabled │
└─────┴─────────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
It doesn't work and I get this error multiple times in highcharts-export-server-error.log :

C:\USERS\\APPDATA\ROAMING\NPM\HIGHCHARTS-EXPORT-SERVER.CMD:1
@ECHO off
^

SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1033:15)
at Module._compile (node:internal/modules/cjs/loader:1069:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Object. (C:\Users\lars\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)

I don't undertand what I'm doing wrong here because this works flawlessly on my Mac machine

[1]: https://github.com/highcharts/node-export-server
[2]: https://www.npmjs.com/package/pm2

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.