Error occured - Error during rendering report: Unsupported module in scripts: http. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["http"] } } ... Alternatively you can also set "*" to allowedModules to enable everything
Stak - 错误:脚本中不支持的模块:http。要在特定模块上启用require,您需要将配置更新为{" scripts":{" allowedModules":[" http"]}} ...或者你也可以设置" *" to allowedModules启用一切 at _require(/Users/ravikirankk/Projects/I-Team/srdm/jsreport/node_modules/jsreport-scripts/lib/scriptEvalChild.js:44:11) 在evalmachine.:2:12 在ContextifyScript.Script.runInContext(vm.js:32:29) 在ContextifyScript.Script.runInNewContext(vm.js:38:15) at Object.runInNewContext(vm.js:91:38) at module.exports(/Users/ravikirankk/Projects/I-Team/srdm/jsreport/node_modules/jsreport-scripts/lib/scriptEvalChild.js:123:6) 在过程中。 (/Users/ravikirankk/Projects/I-Team/srdm/jsreport/node_modules/script-manager/lib/worker-processes.js:48:36) 在emitTwo(events.js:106:13) at process.emit(events.js:194:7) at process.nextTick(internal / child_process.js:766:12)
答案 0 :(得分:1)
require('jsreport')({ "scripts": {
"allowedModules" : ["http"]
} })
更新server.js文件中的require语句