jsreport在html到xlsx配方的节点10.15中不起作用

时间:2019-01-07 11:50:31

标签: node.js jsreport

我在服务器的几乎所有默认设置中运行jsreport v1。通过API调用了2个模板。

一种用于处理程序栏的phantom-pdf,另一种用于html-to-xlsx配方的语言。

之前,在较旧的节点版本中,两者都可以正常运行。但是在当前的节点10.15.0中,html-to-xlsx的节点停止处理以下日志

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'.

其他pdf报告运行正常。

它也会发生,并登录到服务器并直接在gui中运行报告。可能是什么原因造成的?

----其他信息-----

  1. 调用api时没有返回错误响应,只是空白。而且,如果您故意在模板中出错,则会返回错误响应
  2. 在jsreport-tmp中,不会创建两个具有相同名称(id.html和id.xlsx)的文件。仅创建.html文件

1 个答案:

答案 0 :(得分:0)

最后,我只是放弃了,而迁移到2.3.0。 phamtomjs的问题在于它无法将html转换为xlsx。解决了2.3.0迁移