AWS托管区块链-Hyperledger架构错误:无法组装事务notarget没有为fabric-shim@^1.4.2找到匹配的版本

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

我正在使用打字稿创建类似于commercial paper example的超级账本合同,并使用以下命令将其发布到AWS托管区块链服务中:

docker exec -e "CORE_PEER_TLS_ENABLED=true" \
-e "CORE_PEER_TLS_ROOTCERT_FILE=/opt/home/managedblockchain-tls-chain.pem" \
-e "CORE_PEER_LOCALMSPID=$MSP" \
-e  "CORE_PEER_MSPCONFIGPATH=$MSP_PATH" \
-e "CORE_PEER_ADDRESS=$PEER" \
cli peer chaincode instantiate -o $ORDERER \
-C ourchannel --lang node -n papercontract -v v0 \
-c '{"Args":["org.papernet.commercialpaper:instantiate"]}' \
--cafile /opt/home/managedblockchain-tls-chain.pem --tls \
-P "AND ('$ORG1','$ORG2')"

我已经在两个组织中使用此命令安装了合同:

docker exec -e "CORE_PEER_TLS_ENABLED=true" \
-e "CORE_PEER_TLS_ROOTCERT_FILE=/opt/home/managedblockchain-tls-chain.pem" \
-e "CORE_PEER_LOCALMSPID=$MSP" \
-e "CORE_PEER_MSPCONFIGPATH=$MSP_PATH" \
-e "CORE_PEER_ADDRESS=$PEER" \
cli peer chaincode install --lang node -n papercontract -v v0 \
-p chaincode

但是我遇到这个错误:

$ checkChaincodeCmdParams -> INFO 001 Using default escc
$ checkChaincodeCmdParams -> INFO 002 Using default vscc
$ Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction f0803ce6160119859cedd426e5d4d35dfba3ee6fa0653078ef917546b1854ea7: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code ETARGET
npm ERR! notarget No matching version found for fabric-shim@^1.4.2
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'transference-contract'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-08-15T18_22_42_519Z-debug.log
"

我已经在客户端中运行了npm installnpm run build,并且一切正常。问题似乎是该库未下载到区块链内的对等节点中,但由于受到管理,因此我无法真正看到其内部以查看正在发生的情况。

您能给我一些想法吗?我该怎么解决?

谢谢

amazon-web-services hyperledger-fabric blockchain hyperledger
1个回答
0
投票

对等节点不支持Fabric-shim 1.4版本

根据AWS文档:

受管的区块链对等节点使用Fabric-shim库的1.2版为使用Node.js的链代码应用程序提供应用程序,对等方和Hyperledger Fabric系统之间的低级链代码接口。所有链码都对此库有依赖性。不支持对其他版本或其他库软件包的依赖性,因为对等节点当前无法访问NPM存储库。

摘要来自aws的本页:https://docs.aws.amazon.com/managed-blockchain/latest/managementguide/managed-blockchain-hyperledger-write-and-run-chaincode.html

© www.soinside.com 2019 - 2024. All rights reserved.