Hi there,
We've just downloaded the 3.10 release of JSReport and while testing it out with our existing reports (2.11 version) we have found that none of our docx reports are working. PDF, Excel, seem to be ok. I've also tested out the 3.0.1 version and it all works ok.
I've tried recreating one of the reports from scratch removing anything but pure handlebars and I still get the issue.
We get the following error :
Report "confirm2" render failed.
Error when evaluating engine jsrender for template /docx/confirm2
Identifier 'Handlebars' has already been declared
sandbox.js:424
let Handlebars = require('handlebars')
^
SyntaxError: Identifier 'Handlebars' has already been declared
at new Script (node:vm:100:7)
at VMScript.script._compile (/app/node_modules/@jsreport/jsreport-core/lib/worker/sandbox/safeSandbox.js:178:16)
at VMScript._compileVM (/app/node_modules/vm2/lib/main.js:466:37)
at VM.run (/app/node_modules/vm2/lib/main.js:905:20)
at run (/app/node_modules/@jsreport/jsreport-core/lib/worker/sandbox/safeSandbox.js:193:33)
at WorkerReporter._runInSandbox (/app/node_modules/@jsreport/jsreport-core/lib/worker/sandbox/runInSandbox.js:88:12)
at WorkerReporter.runInSandbox (/app/node_modules/@jsreport/jsreport-core/lib/worker/reporter.js:145:17)
at executeEngine (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/executeEngine.js:144:29)
at async engine.engine (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/executeEngine.js:50:14)
at async invokeRender (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:73:23)
at async WorkerReporter._render (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:160:7)
at async /app/node_modules/@jsreport/jsreport-core/lib/worker/reporter.js:171:19
at async Domain.<anonymous> (/app/node_modules/@jsreport/advanced-workers/lib/workerHandler.js:134:19)
Thanks in advance for any feedback.
Cheers,
Dean