Running JSReport on Node 16 yields corrupt Xlsx reports?



  • Have been chasing down an annoying bug where our test servers generated corrupt Xlsx-reports. It turns out that when I run JSReport locally with "node server.js", having a node 16 environment will give me a corrupt Xlsx report while running exactly the same report but with node 14 or 15 will produce correct results.

    I tried with a minimal report with an empty template and only outputting a string into the Excel report with the same outcome.

    (the server instance was running a node:16-alpine image, downgrading to a node:14-alpine image solved it)

    Edit: Locally I'm running Windows 10 so the OS itself does not seem to matter.



  • Thank you. We noticed and fixed this in the jsreport v3 (so far in beta). The problem is one dependency for doing compression that stopped working with node 16. We may back-port the fix also to the jsreport v2, but till then better to stick with LTS node 14.



  • Ah great! Thank you!



  • Just to add that Node v16 becomes Active LTS at the end of this month (26th October 2021) which could mean potentially more people upgrading their node version, from next month on.


  • administrators

    @manemal yes, we are mainly waiting for that (the new LTS) and the next version of jsreport (v3) is likely going to require node 16 as the minimum. this problem is already solved there (v3), just FYI.



  • We will release hopefully the one last hotfix to the v2 during the next week to make the office recipes working with the node 16.



  • Hello @jan_blaha ! We are using jsreport V2 for our project and facing the above xlsx issue after upgrading node to V16. For this we are now updating jsreport to V3. But it seems something is missing even after upgrading to jsreport we are facing some other issues. Please let us know, what are all the dependency packages we need to upgrade or anything we need to do for jsreport V3?



  • Yes, unfortunatelly no further v2 releases are planned and you need to use the node 14 or update to jsreport v3.

    You can follow the jsreport v3 notes here
    https://jsreport.net/blog/jsreport-300-released

    If you have issues, please create a new forum topic.



  • Hey @jan_blaha Thanks for the clarification. Also we are using node 16.16.0 for our project. Is it must to use minimal node V16.11.0?



  • node.js >= 16.11 is required, so yes you can use 16.16.0 with v3


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.