It is good as long as It will not affect jsreport's heath. I am willing to learn if anyone can explain why npm list --depth=0 emits those error messages.
Thanks a lot.
Posts made by Trung Hoang
-
RE: jsreport v2 npm dependency warnings and errors
-
RE: jsreport v2 npm dependency warnings and errors
Hi! I try as you mentioned. Now it does not show "requires peer of.." warnings but with npm list --depth=0 it still showing:
jsreport-server@ /media/data/myjsreport
├── jsreport@2.0.0
└── jsreport-phantom-pdf@2.0.1npm ERR! missing: mkdirp@0.5.1, required by node-pre-gyp@0.9.1
npm ERR! missing: minimist@0.0.8, required by mkdirp@0.5.1
npm ERR! missing: minimatch@3.0.4, required by ignore-walk@3.0.1
npm ERR! missing: brace-expansion@1.1.11, required by minimatch@3.0.4
npm ERR! missing: balanced-match@1.0.0, required by brace-expansion@1.1.11
npm ERR! missing: concat-map@0.0.1, required by brace-expansion@1.1.11
npm ERR! missing: console-control-strings@1.1.0, required by npmlog@4.1.2
npm ERR! missing: inherits@2.0.3, required by readable-stream@2.3.6
npm ERR! missing: safe-buffer@5.1.1, required by readable-stream@2.3.6
npm ERR! missing: safe-buffer@5.1.1, required by string_decoder@1.1.1
npm ERR! missing: console-control-strings@1.1.0, required by gauge@2.7.4
npm ERR! missing: string-width@1.0.2, required by gauge@2.7.4
npm ERR! missing: strip-ansi@3.0.1, required by gauge@2.7.4
npm ERR! missing: code-point-at@1.1.0, required by string-width@1.0.2
npm ERR! missing: is-fullwidth-code-point@1.0.0, required by string-width@1.0.2
npm ERR! missing: strip-ansi@3.0.1, required by string-width@1.0.2
npm ERR! missing: number-is-nan@1.0.1, required by is-fullwidth-code-point@1.0.0
npm ERR! missing: ansi-regex@2.1.1, required by strip-ansi@3.0.1
npm ERR! missing: string-width@1.0.2, required by wide-align@1.1.2
npm ERR! missing: inherits@2.0.3, required by glob@7.1.2
npm ERR! missing: minimatch@3.0.4, required by glob@7.1.2
npm ERR! missing: once@1.4.0, required by glob@7.1.2
npm ERR! missing: once@1.4.0, required by inflight@1.0.6
npm ERR! missing: wrappy@1.0.2, required by inflight@1.0.6
npm ERR! missing: wrappy@1.0.2, required by once@1.4.0
npm ERR! missing: minipass@2.2.4, required by tar@4.4.1
npm ERR! missing: mkdirp@0.5.1, required by tar@4.4.1
npm ERR! missing: safe-buffer@5.1.1, required by tar@4.4.1
npm ERR! missing: yallist@3.0.2, required by tar@4.4.1
npm ERR! missing: minipass@2.2.4, required by fs-minipass@1.2.5
npm ERR! missing: safe-buffer@5.1.1, required by minipass@2.2.4
npm ERR! missing: yallist@3.0.2, required by minipass@2.2.4
npm ERR! missing: minipass@2.2.4, required by minizlib@1.1.0
npm ERR! peer dep missing: webpack@^2.0.0 || ^3.0.0, required by pdfjs-dist@2.0.457
npm ERR! peer dep missing: webpack@^2.0.0 || ^3.0.0 || ^4.0.0, required by worker-loader@1.1.1
npm ERR! peer dep missing: webpack@^2.0.0 || ^3.0.0 || ^4.0.0, required by schema-utils@0.4.5
npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.2.0
npm ERR! invalid: async@2.6.0 /media/data/myjsreport/node_modules/easy-zip/node_modules/asyncWill these be ignored or need to be resolved as well?
-
jsreport v2 npm dependency warnings and errors
Hi,
I was so excited to upgrade to jsreport v2. However, I got these peer dependency warnings:
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN pdfjs-dist@2.0.457 requires a peer of webpack@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN schema-utils@0.4.5 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN worker-loader@1.1.1 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.Does v2 require ajv and webpack@^3.0.0 ?
If I try npm list --depth=0, there are even more npm ERR messages:
jsreport-server@ /media/data/myjsreport
├── jsreport@2.0.0
└── jsreport-phantom-pdf@2.0.1npm ERR! missing: mkdirp@0.5.1, required by node-pre-gyp@0.9.1
npm ERR! missing: minimist@0.0.8, required by mkdirp@0.5.1
npm ERR! missing: minimatch@3.0.4, required by ignore-walk@3.0.1
npm ERR! missing: brace-expansion@1.1.11, required by minimatch@3.0.4
npm ERR! missing: balanced-match@1.0.0, required by brace-expansion@1.1.11
npm ERR! missing: concat-map@0.0.1, required by brace-expansion@1.1.11
npm ERR! missing: console-control-strings@1.1.0, required by npmlog@4.1.2
npm ERR! missing: inherits@2.0.3, required by readable-stream@2.3.6
npm ERR! missing: safe-buffer@5.1.1, required by readable-stream@2.3.6
npm ERR! missing: safe-buffer@5.1.1, required by string_decoder@1.1.1
npm ERR! missing: console-control-strings@1.1.0, required by gauge@2.7.4
npm ERR! missing: string-width@1.0.2, required by gauge@2.7.4
npm ERR! missing: strip-ansi@3.0.1, required by gauge@2.7.4
npm ERR! missing: code-point-at@1.1.0, required by string-width@1.0.2
npm ERR! missing: is-fullwidth-code-point@1.0.0, required by string-width@1.0.2
npm ERR! missing: strip-ansi@3.0.1, required by string-width@1.0.2
npm ERR! missing: number-is-nan@1.0.1, required by is-fullwidth-code-point@1.0.0
npm ERR! missing: ansi-regex@2.1.1, required by strip-ansi@3.0.1
npm ERR! missing: string-width@1.0.2, required by wide-align@1.1.2
npm ERR! missing: inherits@2.0.3, required by glob@7.1.2
npm ERR! missing: minimatch@3.0.4, required by glob@7.1.2
npm ERR! missing: once@1.4.0, required by glob@7.1.2
npm ERR! missing: once@1.4.0, required by inflight@1.0.6
npm ERR! missing: wrappy@1.0.2, required by inflight@1.0.6
npm ERR! missing: wrappy@1.0.2, required by once@1.4.0
npm ERR! missing: minipass@2.2.4, required by tar@4.4.1
npm ERR! missing: mkdirp@0.5.1, required by tar@4.4.1
npm ERR! missing: safe-buffer@5.1.1, required by tar@4.4.1
npm ERR! missing: yallist@3.0.2, required by tar@4.4.1
npm ERR! missing: minipass@2.2.4, required by fs-minipass@1.2.5
npm ERR! missing: safe-buffer@5.1.1, required by minipass@2.2.4
npm ERR! missing: yallist@3.0.2, required by minipass@2.2.4
npm ERR! missing: minipass@2.2.4, required by minizlib@1.1.0
npm ERR! peer dep missing: webpack@^2.0.0 || ^3.0.0, required by pdfjs-dist@2.0.457
npm ERR! peer dep missing: webpack@^2.0.0 || ^3.0.0 || ^4.0.0, required by worker-loader@1.1.1
npm ERR! peer dep missing: webpack@^2.0.0 || ^3.0.0 || ^4.0.0, required by schema-utils@0.4.5
npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.2.0Please any one help how to resolve these.
Note: I am testing in: Ubuntu 14.0.4 LTS and Ubuntu 18 server LTS. Nodejs: 8.10/8.11, npm: 6.0.1
Thanks.
Trung -
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Ok sure. The file was sent. Thanks again. Hopefull It would not happen again. This time we are not lucky during the demo to our customer.
-
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Yey, now it works again. Thanks a lot for your help.
-
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
As with previous resolution when I got error: error: Failed to load collection settings Error: More than 10% of the data file is corrupt, .I backed up /data/settings file then delete it then the server can start. However, I got another error when try to Run the report within localhost:5488
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 - /home/trung/myjsreport/node_modules/jsreport-scripts/lib/scriptEvalChild.js:44
throw new Error('Unsupported module in scripts: ' + moduleName + '. To enable require on particular module, you need to update the configuration as ' +
^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 (/home/trung/myjsreport/node_modules/jsreport-scripts/lib/scriptEvalChild.js:44:11)
at evalmachine.<anonymous>:2:12
at ContextifyScript.Script.runInContext (vm.js:59:29)
at ContextifyScript.Script.runInNewContext (vm.js:65:15)
at Object.runInNewContext (vm.js:135:38)
at module.exports (/home/trung/myjsreport/node_modules/jsreport-scripts/lib/scriptEvalChild.js:123:6)
at process.<anonymous> (/home/trung/myjsreport/node_modules/script-manager/lib/worker-processes.js:48:36)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:772:12) -
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Now, installed in the new folder then I still got error:
myjsreport > jsreport start
2018-01-23T22:38:40.434Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T22:38:40.436Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T22:38:40.437Z - info: Searching for available extensions in /home/trung/myjsreport/
2018-01-23T22:38:40.439Z - info: Extensions location cache not found, crawling directories
2018-01-23T22:38:40.550Z - info: Found 30 extensions
2018-01-23T22:38:40.556Z - debug: Writing extension locations cache to /tmp/jsreport/core/locations.json
2018-01-23T22:38:40.557Z - debug: Discovered 30 extensions
2018-01-23T22:38:40.557Z - info: Using extension import-export
2018-01-23T22:38:40.645Z - info: Using extension tags
2018-01-23T22:38:40.647Z - info: Using extension templates
2018-01-23T22:38:40.648Z - info: Using extension jsrender
2018-01-23T22:38:40.649Z - debug: Extension authentication is disabled, skipping
2018-01-23T22:38:40.649Z - info: Using extension cli
2018-01-23T22:38:40.649Z - info: Using extension handlebars
2018-01-23T22:38:40.650Z - info: Using extension debug
2018-01-23T22:38:40.650Z - info: Using extension express
2018-01-23T22:38:40.688Z - info: Using extension fop-pdf
2018-01-23T22:38:40.691Z - info: Using extension phantom-pdf
2018-01-23T22:38:40.721Z - info: Using extension fs-store
2018-01-23T22:38:40.814Z - info: Using extension authorization
2018-01-23T22:38:40.814Z - debug: Extension authorization was disabled
2018-01-23T22:38:40.814Z - info: Using extension images
2018-01-23T22:38:40.816Z - info: Using extension child-templates
2018-01-23T22:38:40.817Z - info: Using extension browser-client
2018-01-23T22:38:40.817Z - info: Using extension licensing
2018-01-23T22:38:40.831Z - info: Using extension data
2018-01-23T22:38:40.832Z - info: Using extension text
2018-01-23T22:38:40.832Z - info: Using extension reports
2018-01-23T22:38:40.833Z - info: Using extension resources
2018-01-23T22:38:40.834Z - info: Using extension base
2018-01-23T22:38:40.834Z - info: Using extension studio
2018-01-23T22:38:40.869Z - info: Using extension html-to-xlsx
2018-01-23T22:38:40.897Z - info: Using extension scripts
2018-01-23T22:38:40.898Z - info: Using extension assets
2018-01-23T22:38:40.901Z - info: Using extension scheduling
2018-01-23T22:38:40.940Z - info: Using extension xlsx
2018-01-23T22:38:41.010Z - info: Using extension sample-template
2018-01-23T22:38:41.010Z - info: Using extension public-templates
2018-01-23T22:38:41.012Z - debug: Extension public-templates was disabled
2018-01-23T22:38:41.013Z - info: Initializing fs storage at /home/trung/myjsreport/data
2018-01-23T22:38:41.093Z - error: Failed to load collection settings Error: More than 10% of the data file is corrupt, the wrong beforeDeserialization hook may be used. Cautiously refusing to start NeDB to prevent dataloss
at Persistence.treatRawData (/home/trung/myjsreport/node_modules/nedb/lib/persistence.js:242:11)
at /home/trung/myjsreport/node_modules/nedb/lib/persistence.js:281:38
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
2018-01-23T22:38:41.094Z - error: Error occured during reporter init Error: More than 10% of the data file is corrupt, the wrong beforeDeserialization hook may be used. Cautiously refusing to start NeDB to prevent dataloss
at Persistence.treatRawData (/home/trung/myjsreport/node_modules/nedb/lib/persistence.js:242:11)
at /home/trung/myjsreport/node_modules/nedb/lib/persistence.js:281:38
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
Error: An error has occurred when trying to initialize jsreport..
at /home/trung/myjsreport/node_modules/jsreport-cli/lib/instanceHandler.js:31:23
at tryCatcher (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/trung/myjsreport/node_modules/jsreport-core/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5) {"originalError":{"cause":{},"isOperational":true}}
(Original) Error: More than 10% of the data file is corrupt, the wrong beforeDeserialization hook may be used. Cautiously refusing to start NeDB to prevent dataloss
at Persistence.treatRawData (/home/trung/myjsreport/node_modules/nedb/lib/persistence.js:242:11)
at /home/trung/myjsreport/node_modules/nedb/lib/persistence.js:281:38
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) {"cause":{},"isOperational":true} -
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Do you mean to remove jsreport from the root dir level then install it again to a sub folder /home/user/myjsreportproject ?
Do I need to move the /data folder into /home/user/myjsreportproject then re-install the server there? -
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Just because it seems stuck at ..crawling without any further progress for some minutes so I killed the process. Now I let one console going on. What is the maximum crawling time? My PC is fast CPU and using SSD.
-
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
It is weird. I have deleted /tmp/jsreport/core/locations.json for serveral times but still can not start.
~ > jsreport start
2018-01-23T22:06:46.263Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T22:06:46.265Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T22:06:46.266Z - info: Searching for available extensions in /home/user/
2018-01-23T22:06:46.268Z - info: Extensions location cache not found, crawling directories
^[[A^C
~ > jsreport start
2018-01-23T22:07:35.747Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T22:07:35.748Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T22:07:35.750Z - info: Searching for available extensions in /home/user/
2018-01-23T22:07:35.751Z - info: Extensions location cache not found, crawling directoriesI deleted all log files then the newly one is empty no matter how many times I try to start the server.
-
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Hi,
I am sorry about the confusion.
From the console: it just stucks at 2018-01-23T21:45:31.108Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawlingthe repeated ones until ... , crawling I got from the log file /logs/reporter1.log. This log file is > 6MB so I wonder if I can send it to you by email?
-
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
After reinstalled, I got:
~ > jsreport start
2018-01-23T21:38:03.049Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:38:03.050Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:38:03.052Z - info: Searching for available extensions in /home/trung/
2018-01-23T21:38:03.055Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawling~ > node server.js
2018-01-23T21:45:31.103Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:45:31.104Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:45:31.106Z - info: Searching for available extensions in /home/user/
2018-01-23T21:45:31.108Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawling -
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Hi,
All log entries I got are:
2018-01-23T21:04:31.217Z - info: Searching for available extensions in /home/user/
2018-01-23T21:04:31.221Z - info: Extensions location cache contains up to date information, skipping crawling in /home/user/node_modules/
2018-01-23T21:04:54.054Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:04:54.055Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:04:54.056Z - info: Searching for available extensions in /home/user/
2018-01-23T21:04:54.060Z - info: Extensions location cache contains up to date information, skipping crawling in /home/user/node_modules/
2018-01-23T21:05:03.964Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:05:03.964Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:05:03.966Z - info: Searching for available extensions in /home/user/
2018-01-23T21:10:47.282Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:10:47.283Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:10:47.284Z - info: Searching for available extensions in /home/user/
2018-01-23T21:10:47.287Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawling
2018-01-23T21:18:11.631Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:18:11.758Z - info: Searching for available extensions in /home/user/
2018-01-23T21:18:11.759Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawling
2018-01-23T21:18:59.641Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:18:59.641Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:18:59.642Z - info: Searching for available extensions in /home/user/
2018-01-23T21:20:44.729Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:20:44.729Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:20:44.730Z - info: Searching for available extensions in /home/user/
2018-01-23T21:20:44.733Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawling
2018-01-23T21:22:20.358Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:22:20.359Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:22:20.360Z - info: Searching for available extensions in /home/user/
2018-01-23T21:22:20.363Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawling
2018-01-23T21:26:14.591Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:26:14.592Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:26:14.593Z - info: Searching for available extensions in /home/user/I am reinstalling it again now then will let you know.
-
RE: Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
~ > jsreport start
2018-01-23T21:22:20.357Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:22:20.359Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:22:20.360Z - info: Searching for available extensions in /home/trung/
2018-01-23T21:22:20.363Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawling~ > node server.js
2018-01-23T21:26:14.590Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T21:26:14.592Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T21:26:14.593Z - info: Searching for available extensions in /home/trung/
2018-01-23T21:26:14.596Z - info: Extensions location cache /tmp/jsreport/core/locations.json contains older information, crawlingWill reinstall the server still keep the existing report templates and related stuff ?
How to re-install the server?
Thanks.
-
Can not start server - TypeError: Cannot read property 'cwd' of undefined - urgent
Hi,
I can not start the report server either by calling node server.js or jsreport init and jsreport start. Here area the console log:
~ > jsreport start
2018-01-23T20:14:38.879Z - info: Initializing jsreport@1.9.2 in development mode using configuration file: jsreport.config.json
2018-01-23T20:14:38.881Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2018-01-23T20:14:38.883Z - info: Searching for available extensions in /home/user/
2018-01-23T20:14:38.886Z - info: Extensions location cache contains up to date information, skipping crawling in /home/user/node_modules/It has been working fine. But today during the demo to our customer we found that the report server has stopped working. Please help how to start it up again.
jsreport version: 1.9.2
cli version: 1.3.2~ > jsreport -b start
Starts a jsreport process in current working directoryUsage: jsreport start
You can set any jsreport configuration option using arguments or env vars
For example, to set httpPort option using arguments:simple option:
jsreport start --httpPort=9000nested option:
jsreport start --connectionString:name=fsOr using env vars:
Linux/macOS:
simple option:
$> env httpPort=9000 jsreport startnested option:
$> env connectionString:name=9000 jsreport startWindows:
simple option:
$> set httpPort=9000
$> jsreport startnested option:
$> set connectionString:name=9000
$> jsreport startAlso, you can put configuration in jsreport.config.json,
You can learn more about jsreport configuration, conditional config files and
available options here: https://jsreport.net/learn/configurationOptions:
--help, -h Show help [boolean]TypeError: Cannot read property 'cwd' of undefined
at exports.handler (/home/user/node_modules/jsreport-cli/lib/commands/start.js:47:21)
at /home/user/node_modules/jsreport-cli/lib/commander.js:391:12
at tryCatcher (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/method.js:39:29)
at Commander.executeCommand (/home/user/node_modules/jsreport-cli/lib/commander.js:387:21)
at Object.executeCommandInCLIContext [as handler] (/home/user/node_modules/jsreport-cli/lib/commander.js:569:9)
at Object.self.runCommand (/home/user/node_modules/yargs/lib/command.js:170:22)
at parseArgs (/home/user/node_modules/yargs/yargs.js:920:28)
at Object.Yargs.self.parse (/home/user/node_modules/yargs/yargs.js:499:18)
at /home/user/node_modules/jsreport-cli/lib/commander.js:246:20
at tryCatcher (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:691:18)
at Async._drainQueue (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5) {}
TypeError: Cannot read property 'cwd' of undefined
at exports.handler (/home/user/node_modules/jsreport-cli/lib/commands/start.js:47:21)
at /home/user/node_modules/jsreport-cli/lib/commander.js:391:12
at tryCatcher (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/method.js:39:29)
at Commander.executeCommand (/home/user/node_modules/jsreport-cli/lib/commander.js:387:21)
at Object.executeCommandInCLIContext [as handler] (/home/user/node_modules/jsreport-cli/lib/commander.js:569:9)
at Object.self.runCommand (/home/user/node_modules/yargs/lib/command.js:170:22)
at parseArgs (/home/user/node_modules/yargs/yargs.js:920:28)
at Object.Yargs.self.showHelp (/home/user/node_modules/yargs/yargs.js:657:23)
at /home/user/node_modules/jsreport-cli/lib/commander.js:277:22
at tryCatcher (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/promise.js:691:18)
at Async._drainQueue (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/user/node_modules/jsreport-cli/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5) {}Please help.
Thanks.
Trung Hoang -
RE: [Error: Unknown error, status code 404]
Thanks a lot. It works now.
-
[Error: Unknown error, status code 404]
Hi,
I got 404 error when trying to render a sample report.
My code for inline sample:
const client = require('jsreport-client')('http://localhost:5488/api/report');
client.render({
template: {
content: "hello {{:someText}}", recipe: "html",
engine: "jsrender"
},
data: { someText: "world!!" }
}, function (err, response) {
err
response.body(function (body) {
//prints hello world!!
console.log(body.toString());
});
});I tried with the Invoice template but It emitted the same error.
const client = require('jsreport-client')('http://localhost:5488/api/report');client.render(
{
template: { shortid: "rkJTnK2ce" },
engine: "handlebars",
recipe: 'phantom-pdf',
data: { to: "Pavel Sladek", from: "Ban Blaha", price: "800" }
},
function (err, resp) {
err;
console.log(err);
console.log(resp);
// response.body(function(body) {
// //prints hello world!!
// console.log(body.toString());
// });
});{ [Error: Unknown error, status code 404]
response:
IncomingMessage { _readableState:
ReadableState { objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: [Object],
pipesCount: 1,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
... },
readable: false,
domain: null,
_events:
{ end: [Object],
close: [Object],
error: [Object],
data: [Object] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
Socket { connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'localhost',
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 8,
... },
connection:
Socket { connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'localhost',
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 8,
... },
httpVersionMajor: 1,
httpVersionMinor: 1,
... } }Does anyone know why?
Thanks.