Unexpected error during benchmark execution: Error: Cannot find module 'fabric-client'
pertualfeast opened this issue · 3 comments
Hi,
I was trying to run the caliper-benchmark and just immediately i have this error:
error [caliper] [cli-launch-master] Unexpected error during benchmark execution: Error: Cannot find module 'fabric-client'
Usage:
caliper launch master --caliper-bind-sut fabric:1.4.1 [other options]
Options:
--help, -h Show usage information [boolean]
--version Show version information [boolean]
--caliper-bind-sut The name and version of the platform to bind to [string]
--caliper-bind-cwd The working directory for performing the SDK install [string]
--caliper-bind-args Additional arguments to pass to "npm install". Use the "=" notation when setting this parameter [string]
--caliper-bind-file Yaml file to override default (supported) package versions when binding an SDK [string]
{ Error: Cannot find module 'fabric-client'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/root/go/src/github.com/hyperledger/caliper-benchmarks/node_modules/@hyperledger/caliper-fabric/lib/adaptor-versions/v1/fabric-v1.js:17:22)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3) code: 'MODULE_NOT_FOUND' }
I couldnt find any solution.
“npm install fabric-client@1.4.0” and “npm install” is not work
The environmnet:
node 8.9.0
npm 5.5.1
go 1.13.5
Ubuntu 20.04.4
Caliper 0.3.0
Fabric 1.4.1
any suggestions please ?
Some things to point out first
- Caliper 0.3 is not supported anymore
- Fabric 1.4 is not supported anymore
- node 8.9, go 1.13.5 are not supported anymore
You really should not be using these versions. Look to using Caliper 0.5, node 14, 16, Go 1.17, 1.18 and Fabric 2.2 as these are the current supported versions in conjunction with the main branch of caliper-benchmarks
However I think the problem is that your request to bind failed. What errors did you get when you tried to bind ?
Thank you for your reply. I want to use fabric1.4 because I want to test different consensus algorithms, such as Solo, Kafka and Raft. Frabric2.2 discard Kafka. There was indeed an error in the bind segment. I tried many methods but failed to solve them. Then I ignored it, because in frabric2.2+caliper0.4, when testing the built network, caliper works even if there are the same errors. How can I solve this problem?
@pertualfeast fabric 2.2 still supports Kafka, you can also use caliper 0.5 to benchmark a fabric 1.4 system. The problem looks to be an issue with how you installed node.js. I would recommend using NVM to manage installing node see https://github.com/nvm-sh/nvm, also as you are on ubuntu to avoid some warnings I suggest you install build-essential
sudo apt-get -y build-essential