简体   繁体   中英

How to Alternatively set “*” to allowedModules to enable everything in jsreport script file?

I'm trying to create a report using jsreport STUDIO, but I got error like below

Error occured - Error during rendering report: Unsupported module in scripts: request. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["request"] } } ... Alternatively you can also set " " to allowedModules to enable everything Stak - Error: Unsupported module in scripts: request. To enable require on particular module, you need to update the configuration as {"scripts": { "allowedModules": ["request"] } } ... Alternatively you can also set " " to allowedModules to enable everything

Can anyone tell me where I can find the configuration file to update the allowedModules ?

https://jsreport.net/learn/configuration

jsreport merges configuration from file, environment variables, command line arguments and also directly from the application code. The configuration file needs to be stored at the root of the application with the name prod.config.json. There should be already pre created for you the default one.

There should be dev|prod.config.json in your app root if you followed the common installation. You should edit it and add the required options. If you use jsreport inside your node.js application, you should pass this option through the options object in call require('jsreport')({scripts: { ... } })

I have changed the dev.config.json file. It works fine

"scripts": {
"allowedModules": ["request"],
"timeout": 60000
},

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM