Closed ravi0511 closed 5 years ago
Verbiage from terminal:
ravi@ravi-VirtualBox:~/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04$ npm run test
zerotoblockchain-network@0.1.6 pretest /home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04 npm run lint
zerotoblockchain-network@0.1.6 lint /home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04 eslint ./network
zerotoblockchain-network@0.1.6 postlint /home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04 npm run licchk
zerotoblockchain-network@0.1.6 licchk /home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04 license-check
events.js:183
throw er; // Unhandled 'error' event
^
Error: The following file doesnt contain the license header /home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/Documentation/answers/lib/sample_complete.js at error (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/gulp-license-check/index.js:140:54) at checkHeaderFromBuffer (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/gulp-license-check/index.js:84:4) at DestroyableTransform._transform (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/gulp-license-check/index.js:41:5) at DestroyableTransform.Transform._read (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/readable-stream/lib/_stream_transform.js:184:10) at DestroyableTransform.Transform._write (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/readable-stream/lib/_stream_transform.js:172:83) at doWrite (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/readable-stream/lib/_stream_writable.js:428:64) at writeOrBuffer (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/readable-stream/lib/_stream_writable.js:417:5) at DestroyableTransform.Writable.write (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/readable-stream/lib/_stream_writable.js:334:11) at DestroyableTransform.ondata (/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/readable-stream/lib/_stream_readable.js:619:20) at emitOne (events.js:116:13) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! zerotoblockchain-network@0.1.6 licchk:
license-check`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zerotoblockchain-network@0.1.6 licchk script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ravi/.npm/_logs/2019-03-23T16_07_40_431Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zerotoblockchain-network@0.1.6 postlint: npm run licchk
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zerotoblockchain-network@0.1.6 postlint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ravi/.npm/_logs/2019-03-23T16_07_40_477Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zerotoblockchain-network@0.1.6 pretest: npm run lint
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zerotoblockchain-network@0.1.6 pretest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/ravi/.npm/_logs/2019-03-23T16_07_40_501Z-debug.log
The JavaScript file Chapter04/Documentation/answers/lib/sample_complete.js is missing an empty line immediately after the license information. If you add that line, the test script will continue.
Hi Team,
I have been following all the exact steps and at chapter 04 after running buildAndDeploy.sh script successfully, when i ran npm run test, it is failing, please find logs from .npm folder below.
Should i take this issue into account ? As i see this just as a test run. Can i continue with the other chapters ?
0 info it worked if it ends with ok 1 verbose cli [ '/home/ravi/.nvm/versions/node/v8.12.0/bin/node', 1 verbose cli '/home/ravi/.nvm/versions/node/v8.12.0/bin/npm', 1 verbose cli 'run', 1 verbose cli 'test' ] 2 info using npm@6.9.0 3 info using node@v8.12.0 4 verbose run-script [ 'pretest', 'test', 'posttest' ] 5 info lifecycle zerotoblockchain-network@0.1.6~pretest: zerotoblockchain-network@0.1.6 6 verbose lifecycle zerotoblockchain-network@0.1.6~pretest: unsafe-perm in lifecycle true 7 verbose lifecycle zerotoblockchain-network@0.1.6~pretest: PATH: /home/ravi/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04/node_modules/.bin:/home/ravi/.nvm/versions/node/v8.12.0/bin:/home/ravi/fabric-tools/bin:/home/ravi/fabric-tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 8 verbose lifecycle zerotoblockchain-network@0.1.6~pretest: CWD: /home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04 9 silly lifecycle zerotoblockchain-network@0.1.6~pretest: Args: [ '-c', 'npm run lint' ] 10 silly lifecycle zerotoblockchain-network@0.1.6~pretest: Returned: code: 1 signal: null 11 info lifecycle zerotoblockchain-network@0.1.6~pretest: Failed to exec pretest script 12 verbose stack Error: zerotoblockchain-network@0.1.6 pretest: (/home/ravi/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
12 verbose stack at emitTwo (events.js:126:13)
12 verbose stack at EventEmitter.emit (events.js:214:7)
12 verbose stack at ChildProcess. (/home/ravi/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
12 verbose stack at emitTwo (events.js:126:13)
12 verbose stack at ChildProcess.emit (events.js:214:7)
12 verbose stack at maybeClose (internal/child_process.js:915:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
13 verbose pkgid zerotoblockchain-network@0.1.6
14 verbose cwd /home/ravi/Documents/IBM/ZeroToBlockchain/ZeroToBlockchain/Chapter04
15 verbose Linux 4.18.0-15-generic
16 verbose argv "/home/ravi/.nvm/versions/node/v8.12.0/bin/node" "/home/ravi/.nvm/versions/node/v8.12.0/bin/npm" "run" "test"
17 verbose node v8.12.0
18 verbose npm v6.9.0
19 error code ELIFECYCLE
20 error errno 1
21 error zerotoblockchain-network@0.1.6 pretest:
npm run lint
12 verbose stack Exit status 1 12 verbose stack at EventEmitter.npm run lint
21 error Exit status 1 22 error Failed at the zerotoblockchain-network@0.1.6 pretest script. 22 error This is probably not a problem with npm. There is likely additional logging output above. 23 verbose exit [ 1, true ]Regards, Ravi