Error during rendering report: an Unsupported module in scripts: request. To enable require on particular module
-
I have the below error
An error occurred - Error during rendering report: an 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
Also, I am already updating the [dev|prod] configuration file as the following:-"tasks": {
"strategy": "in-process",
"timeout": 10000,
"allowedModules": ""
},
"scripts": {
"allowedModules": "",
"timeout": 60000
},
-
You seems to miss the star sign
"allowedModules": "*"
-
still not working
"tasks": {
"strategy": "in-process",
"timeout": 10000,
"allowedModules": ""
},
"scripts": {
"allowedModules": "",
"timeout": 60000
},
-
I am update "allowedModules": "*" and still not working
-
any update on the error 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
at _require (C:\WINDOWS\system32\node_modules\jsreport-scripts\lib\scriptEvalChild.js:44:11)
at evalmachine.<anonymous>:1:18
at ContextifyScript.Script.runInContext (vm.js:35:29)
at ContextifyScript.Script.runInNewContext (vm.js:41:15)
at Object.runInNewContext (vm.js:93:38)
at module.exports (C:\WINDOWS\system32\node_modules\jsreport-scripts\lib\scriptEvalChild.js:123:6)
at process.<anonymous> (C:\WINDOWS\system32\node_modules\script-manager\lib\worker-processes.js:48:36)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:758:12)
-
Why do you install jsreport into
C:\WINDOWS\system32
?
Create your own folder somewhere and install there.
-
still, I have the same error
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 (C:\jsreport\node_modules\jsreport-scripts\lib\scriptEvalChild.js:44:11)
at evalmachine.<anonymous>:2:12
at ContextifyScript.Script.runInContext (vm.js:35:29)
at ContextifyScript.Script.runInNewContext (vm.js:41:15)
at Object.runInNewContext (vm.js:93:38)
at module.exports (C:\jsreport\node_modules\jsreport-scripts\lib\scriptEvalChild.js:123:6)
at process.<anonymous> (C:\jsreport\node_modules\script-manager\lib\worker-processes.js:48:36)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:758:12)
-
It must work... Please share the whole config file and the output logs. Did you restart jsreport after changing the config?
-
yes I am restart jsreport after changing the config
dev.config
{
"certificate": {
"key": "certificates/jsreport.net.key",
"cert": "certificates/jsreport.net.cert"
},
"authentication": {
"cookieSession": {
"secret": "<your strong secret>"
},
"admin": {
"username": "admin",
"password": "password"
},
"enabled": false
},
"connectionString": {
"name": "fs"
},
"httpPort": 5488,
"httpsPort": null,
"logger": {
"console": {
"transport": "console",
"level": "debug"
},
"file": {
"transport": "file",
"level": "info",
"filename": "logs/reporter.log"
},
"error": {
"transport": "file",
"level": "error",
"filename": "logs/error.log"
}
},
"blobStorage": "fileSystem",
"phantom": {
"strategy": "dedicated-process",
"timeout": 60000
},
"tasks": {
"strategy": "dedicated-process",
"timeout": 10000000,
"allowedModules": ""
},
"scripts": {
"allowedModules": "",
"timeout": 10000000
},
"sample-template": {
"createSamples": true
}
}
-
i will reistall jsreport
-
hi! you don't have
"allowedModules": "*"
(you have an empty string""
in bothallowedModules
fields) in that file.update config:
{ "certificate": { "key": "certificates/jsreport.net.key", "cert": "certificates/jsreport.net.cert" }, "authentication": { "cookieSession": { "secret": "<your strong secret>" }, "admin": { "username": "admin", "password": "password" }, "enabled": false }, "connectionString": { "name": "fs" }, "httpPort": 5488, "httpsPort": null, "logger": { "console": { "transport": "console", "level": "debug" }, "file": { "transport": "file", "level": "info", "filename": "logs/reporter.log" }, "error": { "transport": "file", "level": "error", "filename": "logs/error.log" } }, "blobStorage": "fileSystem", "phantom": { "strategy": "dedicated-process", "timeout": 60000 }, "tasks": { "strategy": "dedicated-process", "timeout": 10000000, "allowedModules": "*" }, "scripts": { "allowedModules": "*", "timeout": 10000000 }, "sample-template": { "createSamples": true } }
-
thank you