【问题标题】:how to get rid of Unsupported module in scripts: http for jsreport如何摆脱脚本中不支持的模块:http for jsreport
【发布时间】:2017-06-08 17:14:49
【问题描述】:
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"] } } ... 或者您也可以将 "*" 设置为 allowedModules 以启用所有内容 在 _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) 在 Object.runInNewContext (vm.js:91:38) 在 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) 在 process.emit (events.js:194:7) 在 process.nextTick (internal/child_process.js:766:12)

【问题讨论】:

    标签: jsreport


    【解决方案1】:
    require('jsreport')({ "scripts": {
    "allowedModules" : ["http"]
    

    } })

    更新 server.js 文件中的 require 语句

    【讨论】:

      猜你喜欢
      • 2013-06-18
      • 2021-10-24
      • 1970-01-01
      • 2019-12-21
      • 2010-11-08
      • 1970-01-01
      • 2021-11-10
      • 1970-01-01
      • 2013-03-12
      相关资源
      最近更新 更多