无法使用Hyperledger Fabric在我的链码nodejs项目上安装fabric-shim

问题描述 投票:0回答:1

问题:

我正在尝试使用Hyperledger-fabric建立一个区块链网络。当我在nodejs项目初始化之后开始制作链码时,我尝试安装fabric-shim软件包,但未安装,这会在终端上显示此错误。

LINK:致命错误LNK1181:无法打开输入文件'C:\ OpenSSL-Win64 \ lib \ libeay32.lib'[D:\ Hyperledger_Fabric_Sample \ chaincode \ healthcare \ node_modules \ fabric-shim \ node_modules @ ampretia \ x509 \ build \ 50倍9.vcxproj]糟糕!建立错误糟糕!堆栈错误:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe失败,退出代码:1糟糕!堆栈在ChildProcess.onExit(C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ lib \ build.js:262:23)糟糕!堆栈在ChildProcess.emit(events.js:198:13)糟糕!堆栈位于Process.ChildProcess._handle.onexit(内部/child_process.js:248:12)糟糕!系统Windows_NT 10.0.18362糟糕!命令“ C:\ Program Files \ nodejs \ node.exe”“ C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ bin \ node-gyp.js”“重建”糟糕! Cwd D:\ Hyperledger_Fabric_Sample \ chaincode \ healthcare \ node_modules \ fabric-shim \ node_modules @ ampretia \ x509糟糕!节点-v v10.16.3糟糕!节点gyp -v v3.8.0糟糕!不好npm WARN [email protected]没有存储库字段。

这是我的package.json文件。

{
  "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"
}

有人可以帮我解决这个问题吗?谢谢

node.js npm hyperledger-fabric
1个回答
0
投票

我不太了解您的问题,但是您的package.json绝对缺少依赖项部分,这可能会阻止您的链式代码生成,如果您的链式代码实现基于ContractInterface(扩展Contract类),则包括这两个内容,否则包含使用ChaincodeInterface然后只包含fabric-shim:

"dependencies": {
"fabric-chaincode-api": "^1.4.0",
"fabric-shim": "^1.4.0"
}
© www.soinside.com 2019 - 2024. All rights reserved.