Not able to execute fabcar demo in Hyperledger

0 votes

I am tring to execute fabcar example from Hyperledger-fabric where I have created few cars. When I try to execute

node query.js

at ../fabric-samples/fabcar I am getting an error

fabric-client not found 

If I execute

npm install

I have node 6.9.0 and npm 3.10.0
I am getting error like this

> grpc@1.2.4 install /home/.../fabric-samples/fabcar/node_modules/grpc
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.2.4/node-v57-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.2.4 and node@8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp) 
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/.../fabric-samples/fabcar/node_modules/grpc/.node-gyp"
make: Entering directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build'
make: *** No rule to make target '../.node-gyp/8.0.0/include/node/common.gypi', needed by 'Makefile'.  Stop.
make: Leaving directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.4.0-42-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary"
gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node
--module_name=grpc_node --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.4.0-42-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules /npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build  --module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node  --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary' (1)
fabcar@1.0.0 /home/.../fabric-samples/fabcar`-- (empty)

npm WARN fabcar@1.0.0 No repository field.
npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v8.0.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

Jul 24, 2018 in Blockchain by aryya
• 7,450 points
915 views

1 answer to this question.

0 votes

This can be solved by deleting directory node_module and then doing npm install again

answered Jul 24, 2018 by charlie_brown
• 7,720 points

Related Questions In Blockchain

0 votes
1 answer

Not being able to deploy blockchain demo app on bluemix

The car lease demo's "Deploy to Bluemix" ...READ MORE

answered Jul 11, 2018 in Blockchain by Shashank
• 10,400 points
499 views
0 votes
1 answer

Not able to execute a deployed contract?

The problem is that you are not ...READ MORE

answered Jul 30, 2018 in Blockchain by digger
• 26,740 points
477 views
0 votes
1 answer

Blockchain peer not able to min block in Azure.

After trying out various ideas, making sure ...READ MORE

answered Aug 21, 2018 in Blockchain by Perry
• 17,100 points
367 views
0 votes
1 answer

Blockchain Hyperledger private key not able to send coins

From the code you posted, if(whichType == TX_SCRIPTHASH){//pay ...READ MORE

answered Sep 14, 2018 in Blockchain by digger
• 26,740 points
453 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

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,706 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
0 votes
1 answer

Not Able to register a user with Hyperledger-Fabric v1.1 preview

The error: "Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,720 points
1,652 views
0 votes
1 answer
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