since that you were using jsreport v1 and you upgraded to v2 but you forgot to update the format of your configuration options.
please check this page https://jsreport.net/blog/jsreport-v2-released to know what you need to change.
hint: you will need something like this in the end
exports.jsreport = jsreportcore({
templatingEngines: { strategy: 'in-process' },
appPath: "/report",
phantom: {
allowLocalFilesAccess: false
},
extensions: {
express: { app: app, server: server },
assets: {
allowedFiles: "**",
publicAccessEnabled: true,
searchOnDiskIfNotFoundInStore: true,
},
scripts: {
allowedModules: "*"
}
}
});