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.
Trung Hoang
@Trung Hoang
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.