0
votes

Problem:

I am trying to build a blockchain network using Hyperledger-fabric. When I start to make a chaincode after nodejs project init I try to install a fabric-shim package but without installation, it gives me this error on the terminal.

LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [D:\Hyperledger_Fabric_Sample\chaincode\healthcare\node_modules\fabric-shim\node_modules@ampretia\x509\build\x50 9.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\Hyperledger_Fabric_Sample\chaincode\healthcare\node_modules\fabric-shim\node_modules@ampretia\x509 gyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN [email protected] No repository field.

This is my package.json file.

{
  "name": "healthcare",
  "version": "1.0.0",
  "description": "This is chaincode for healthcare system",
  "engines": {
        "node": ">=8.4.0",
        "npm": ">=5.3.0"
    },
  "scripts": {
    "start": "node trafficfine.js"
  },
  "engine-strict": true,
  "author": "TharinduCS",
  "license": "ISC"
}

Can someone help me to solve this issue? Thank you

1

1 Answers

0
votes

I did not quite understood your problem but your package.json is definitely missing the dependencies section which might be preventing your chaincode build, in case your chaincode implementation is ContractInterface(extending the Contract class) based then include both of these or else if using the ChaincodeInterface then just include the fabric-shim :

"dependencies": {
"fabric-chaincode-api": "^1.4.0",
"fabric-shim": "^1.4.0"
}