KRKR
KRKR

Reputation: 2815

how to get rid of Unsupported module in scripts: http for jsreport

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 - Error: 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 at _require (/Users/ravikirankk/Projects/I-Team/srdm/jsreport/node_modules/jsreport-scripts/lib/scriptEvalChild.js:44:11) at evalmachine.:2:12 at ContextifyScript.Script.runInContext (vm.js:32:29) at 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) at process. (/Users/ravikirankk/Projects/I-Team/srdm/jsreport/node_modules/script-manager/lib/worker-processes.js:48:36) at emitTwo (events.js:106:13) at process.emit (events.js:194:7) at process.nextTick (internal/child_process.js:766:12)

Upvotes: 1

Views: 324

Answers (1)

KRKR
KRKR

Reputation: 2815

require('jsreport')({ "scripts": {
"allowedModules" : ["http"]

} })

Update the require statement in server.js file

Upvotes: 1

Related Questions