Hyperledger Blockchain Explorer Error no test specified error

0 votes

I am trying to install hyperledger blockchain explorer and following the steps given here:

https://github.com/hyperledger/blockchain-explorer

I am running the following command:

cd blockchain-explorer/app/test


npm install


npm run test


cd blockchain-explorer


npm install


cd client/


npm install


npm test -- -u --coverage

npm run build

I get this error:

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-exp                                                                                                                     lorer$ npm run test


> hyperledger-explorer@0.3.0 test /home/ubuntu/gopath/src/github.com/hyperledger                                                                                                                     /fabric/blockchain-explorer

> echo 'Error: no test specified'


Error: no test specified

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-exp                                                                                                                     lorer$ cd ..

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric$ cd examples/e                                                                                                                     2e_cli/

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/examples/e2e_c                                                                                                                     li$ npm run test

npm ERR! path /home/ubuntu/gopath/src/github.com/hyperledger/fabric/examples/e2e                                                                                                                     _cli/package.json

npm ERR! code ENOENT

npm ERR! errno -2

npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/home/ubuntu/gopath/src                                                                                                                     /github.com/hyperledger/fabric/examples/e2e_cli/package.json'

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent


npm ERR! A complete log of this run can be found in:

npm ERR!     /home/ubuntu/.npm/_logs/2018-04-12T11_02_45_161Z-debug.log

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli$ cd ..                                                                                                            ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/examples$ cd ..

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric$ cd blockchain-explorer/

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer$ cd app/test/

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$ npm install

npm WARN hyperledger-explorer-test@0.3.0 No repository field.


up to date in 1.802s

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$ sudo npm install

npm WARN hyperledger-explorer-test@0.3.0 No repository field.


up to date in 1.725s

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$ ls -all

total 104

drwxrwxr-x  3 ubuntu ubuntu  4096 Apr 12 10:39 .

drwxrwxr-x 11 ubuntu ubuntu  4096 Apr 12 10:11 ..

drwxrwxr-x 61 ubuntu ubuntu  4096 Apr 12 10:39 node_modules

-rw-rw-r--  1 ubuntu ubuntu   433 Apr 12 10:39 package.json

-rw-rw-r--  1 ubuntu ubuntu 83488 Apr 12 10:39 package-lock.json

-rw-rw-r--  1 ubuntu ubuntu   519 Apr 12 10:11 test.js

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$ vi package.json

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$ vi package.json

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$ clear

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$ npm run test


> hyperledger-explorer-test@0.3.0 test /home/ubuntu/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test

> mocha *.js  --exit


module.js:549

    throw err;

    ^


Error: Cannot find module 'log4js'

    at Function.Module._resolveFilename (module.js:547:15)

    at Function.Module._load (module.js:474:25)

    at Module.require (module.js:596:17)

    at require (internal/module.js:11:18)

    at Object.<anonymous> (/home/ubuntu/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/helper.js:17:14)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Module.require (module.js:596:17)

    at require (internal/module.js:11:18)

    at Object.<anonymous> (/home/ubuntu/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test/test.js:7:14)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Module.require (module.js:596:17)

    at require (internal/module.js:11:18)

    at /home/ubuntu/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test/node_modules/mocha/lib/mocha.js:231:27

    at Array.forEach (<anonymous>)

    at Mocha.loadFiles (/home/ubuntu/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test/node_modules/mocha/lib/mocha.js:228:14)

    at Mocha.run (/home/ubuntu/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test/node_modules/mocha/lib/mocha.js:536:10)

    at Object.<anonymous> (/home/ubuntu/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test/node_modules/mocha/bin/_mocha:582:18)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Function.Module.runMain (module.js:693:10)

    at startup (bootstrap_node.js:188:16)

    at bootstrap_node.js:609:3

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! hyperledger-explorer-test@0.3.0 test: `mocha *.js  --exit`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the hyperledger-explorer-test@0.3.0 test 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/ubuntu/.npm/_logs/2018-04-12T11_08_28_132Z-debug.log

ubuntu@ip-172-31-2-180:~/gopath/src/github.com/hyperledger/fabric/blockchain-explorer/app/test$

How to solve this error?

Aug 9, 2018 in Blockchain by slayer
• 29,350 points
1,368 views

1 answer to this question.

0 votes

You have run the npm install command from the blockchain-explorer directory and not from blockchain-explorer/app/test

Run your commands like this and it should work:

cd blockchain-explorer
npm install
answered Aug 9, 2018 by digger
• 26,740 points

Related Questions In Blockchain

0 votes
1 answer

Hyperledger Fabric: "No go in PATH" error.

The error is because the go path ...READ MORE

answered Jun 27, 2018 in Blockchain by Omkar
• 69,210 points
1,340 views
0 votes
2 answers

Truffle migrate gives “ Error: No network specified. ”

You have to mention on which network ...READ MORE

answered Aug 13, 2018 in Blockchain by Omkar
• 69,210 points
1,442 views
0 votes
1 answer

Hyperledger Composer rest server NPM versions

The Hyperledger Composer pre-requisites can be installed ...READ MORE

answered Jul 13, 2018 in Blockchain by Christine
• 15,790 points
640 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
+1 vote
2 answers

Challenge while setting up Hyperledger Fabric 1.0 in Ubuntu 16.04

The rocksdb error you're seeing wouldn't be ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points

edited Jun 8, 2020 by Sirajul 927 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP