SyntaxError in jsreport-core/lib/reporter.js

  • I haven't seen anyone else with this problem, but I have been unable to get jsreport-core working at all. I have what looks to be the correct versions of node and npm installed and am trying to build this into an azure function in VS Code.

    My StackTrace looks like this has anyone dealt with something similar?

    mscorlib: Exception while executing function: Functions.JSReportHttpTrigger. mscorlib: One or more errors occurred. C:\Users\Dev\node_modules\jsreport-core\lib\reporter.js:89
    async init () {

    SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17) at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\Stephen\node_modules\jsreport-core\index.js:1:78).

  • administrators

    it looks like your azure function is running with a node version that is not compatible with async/await, jsreport v2 requires node.js >= 8.9. what version of node is your azure function using?

    i don't know what is the status of azure functions right now but according to this post it was needed to update some things in order to be able to use async syntax.

Log in to reply

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