You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation for highcharts-export-server : it says that you should use PM2 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 :
[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 │ <ME> │ disabled │
└─────┴─────────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
It doesn't work and I get this error multiple times in highcharts-export-server-error.log :
C:\USERS\<ME>\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.<anonymous> (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
The text was updated successfully, but these errors were encountered:
Was anyone ever able to launch highcharts-export-server via pm2 in windows? I can launch from command line or a batch file without issue, but pm2 fails due to the command line switches mentioned above.
An example of launching via commandline:
highcharts-export-server --port [my port num] --allowCodeExecution 1 --enableServer 1
From the cmd line this works or I can launch it from a bat using: start cmd /k "highcharts-export-server --port [my port num] --allowCodeExecution 1 --enableServer 1"
but pm2 cannot handle those switches. In older versions of highcharts-export-server we were using a js file to set all of those properties, then launching that from pm2 (so it would keep it alive and we could have multiple instances). In this we had highcharts-server.js that contained:
const exporter = require('highcharts-export-server');
exporter.initPool({initialWorkers:2});
exporter.startServer([my port num]);
Then that file could be launched via pm2 as follows: pm2 start highcharts-server.js -i 2
I don't see any documentation to support this with the new version of highcharts-export-server and I am having the same issue as the OP attempting to launch from pm2 using the command line as described in the documentation.
Did anyone solve the OP's question?
If not, are there alternatives that allow pm2?
In the documentation for highcharts-export-server : it says that you should use PM2 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 :
However when I run :
I get :
It doesn't work and I get this error multiple times in highcharts-export-server-error.log :
I don't undertand what I'm doing wrong here because this works flawlessly on my Mac machine
The text was updated successfully, but these errors were encountered: