Search code examples
node.jsjsreport

jsreport does not work in node 10.15 with html to xlsx recipe


I run jsreport v1 in pretty much default settings in a server. 2 templates are called via API.

One use phantom-pdf with handler bar and one with html-to-xlsx recipe.

Before, in the older node version, both run fine. But in the current with node 10.15.0, the one with html-to-xlsx stopped working with the following logs

Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.197Z - #033[32minfo#033[39m: Starting rendering request 1 (user: null) requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.199Z - #033[32minfo#033[39m: Rendering template {shortid:HJUirFhd, recipe:html-to-xlsx,engine:handlebars} requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.200Z - #033[34mdebug#033[39m: Inline data specified. requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.202Z - #033[34mdebug#033[39m: Executing script HJesfUxlL requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.282Z - #033[34mdebug#033[39m: Found 0 applicable resources. requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.284Z - #033[34mdebug#033[39m: Rendering engine handlebars requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.426Z - #033[34mdebug#033[39m: Compiled template not found in the cache, compiling timestamp=Mon Jan 07 2019 12:43:54 GMT+0100 (Central European Standard Time), requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.428Z - #033[34mdebug#033[39m: Replaced images [] requestId=1
Jan  7 12:43:54 ps npm[21570]: 2019-01-07T11:43:54.429Z - #033[34mdebug#033[39m: Executing recipe html-to-xlsx requestId=1
Jan  7 12:43:54 ps npm[21570]: npm ERR! code ELIFECYCLE
Jan  7 12:43:54 ps npm[21570]: npm ERR! errno 1
Jan  7 12:43:54 ps npm[21570]: npm ERR! jsreport-server@ start: `node server.js`
Jan  7 12:43:54 ps npm[21570]: npm ERR! Exit status 1
Jan  7 12:43:54 ps npm[21570]: npm ERR!
Jan  7 12:43:54 ps npm[21570]: npm ERR! Failed at the jsreport-server@ start script.
Jan  7 12:43:54 ps npm[21570]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Jan  7 12:43:54 ps systemd[1]: jsreportapp.service: Main process exited, code=exited, status=1/FAILURE
Jan  7 12:43:54 ps systemd[1]: jsreportapp.service: Failed with result 'exit-code'.

The other pdf report runs just fine.

And it also happens and log in to the server and run the report directly in the gui. What could be the cause of this?

----Additional info-----

  1. When call to the api, there is not a error response back.It is just blank. And if you deliberately make a error in the template, there is error response back
  2. In jsreport-tmp, the 2 files with identical name (id.html and id.xlsx) is not created. Only .html file is created

Solution

  • In the end, I just give up on it and migrate to 2.3.0. It was a problem with phamtomjs that it could not convert the html to xlsx. Solved with 2.3.0 migration