raj-71 / healthcare-hyperledger

Secure healthcare records management using Hyperledger Fabric.
3 stars 7 forks source link

there seems to be an issue while running ./fablo up fablo-config.json #1

Closed RizanKhan837 closed 7 months ago

RizanKhan837 commented 7 months ago

i'm facing the following error after running this command

npm ERR! code 1
npm ERR! path /home/rizan/Desktop/heathcare-hyperledger/chaincodes/chaincode-kv-node/node_modules/@theledger/fabric-mock-stub/node_modules/fabric-shim/node_modules/grpc
npm ERR! command failed
npm ERR! command sh -c -- node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@16.20.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
npm ERR! gyp WARN EACCES current user ("rizan") does not have permission to access the dev dir "/root/.cache/node-gyp/16.20.0"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/rizan/.nvm/versions/node/v16.20.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/rizan/Desktop/heathcare-hyperledger/chaincodes/chaincode-kv-node/node_modules/@theledger/fabric-mock-stub/node_modules/fabric-shim/node_modules/grpc/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/rizan/.nvm/versions/node/v16.20.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/tmp/.node-gyp/16.20.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/tmp/.node-gyp/16.20.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/rizan/.nvm/versions/node/v16.20.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/tmp/.node-gyp/16.20.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/rizan/Desktop/heathcare-hyperledger/chaincodes/chaincode-kv-node/node_modules/@theledger/fabric-mock-stub/node_modules/fabric-shim/node_modules/grpc',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/home/rizan/.nvm/versions/node/v16.20.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:284:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Linux 5.15.146.1-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/home/rizan/.nvm/versions/node/v16.20.0/bin/node" "/home/rizan/.nvm/versions/node/v16.20.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/rizan/Desktop/heathcare-hyperledger/chaincodes/chaincode-kv-node/node_modules/@theledger/fabric-mock-stub/node_modules/fabric-shim/node_modules/grpc
npm ERR! gyp ERR! node -v v16.20.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-01-31T09_33_47_739Z-debug-0.log
raj-71 commented 7 months ago

Did you try running it with root privileges?

RizanKhan837 commented 7 months ago

yeah the above error is resolved but after this command when i run this cd backend/config it says No such file or directory. does this folder generates automatically after this command i.e. ./fablo up fablo-config.json

raj-71 commented 7 months ago

I accidentally added that folder in gitignore file. Corrected that, now you should be able to use it. Create new ccp files using .generate-ccp.sh

RizanKhan837 commented 7 months ago

also i'm facing this error at the end of output after running this command ./fablo up fablo-config.json

Error: failed to create deliver client for orderer: orderer client failed to connect to orderer0.group1.orderer.healthcare.com:7030: failed to create new connection: context deadline exceeded

Could you assist me in resolving this issue? Your help would be greatly appreciated.

RizanKhan837 commented 7 months ago

I accidentally added that folder in gitignore file. Corrected that, now you should be able to use it. Create new ccp files using .generate-ccp.sh

Thans alot bro it worked...