我无法继续composer runtime install --card PeerAdmin@hlfv1 --businessNetworkName tutorial-network
。
然后我在区块链代码主文件夹下的fabric-tools文件夹中运行createPeerAdminCard.sh
。该过程已完成,但未创建任何卡。
(anaconda2) $ ./createPeerAdminCard.sh
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is unset, assuming hlfv1
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Need to have composer-cli installed at v0.15 or greater
这似乎表明存在问题。根据我发现的here from IBM:
的参考,预期输出应该如下所示Successfully created business network card to /tmp/PeerAdmin@hlfv1.card
Command succeeded
Successfully imported business network card: PeerAdmin@hlfv1
Command succeeded
Hyperledger Composer PeerAdmin card has been imported
The following Business Network Cards are available:
┌─────────────────┬───────────┬─────────┐
│ CardName │ UserId │ Network │
├─────────────────┼───────────┼─────────┤
│ PeerAdmin@hlfv1 │ PeerAdmin │ │
└─────────────────┴───────────┴─────────┘
Issue composer card list --name <CardName> to get details of the card
Command succeeded
然后我设法运行npm install -g composer-cli
尝试将 composer-cli 更新到0.16.2之后,经过大量的调整,将npm config
指向python 2.7作为我的主要python是通过anaconda建立的python 3。
....
gyp info ok
> grpc@1.6.6 install /Users/userdirectory/Hyperledger/my-business-network/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
[grpc] Success: "/Users/userdirectory/Hyperledger/my-business-network/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64/grpc_node.node" is installed via remote
> protobufjs@6.6.3 postinstall /Users/userdirectory/Hyperledger/my-business-network/node_modules/protobufjs
> node scripts/postinstall
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN my-business-network@0.0.1 No repository field.
+ composer-cli@0.16.2
added 1055 packages in 48.356s
这似乎表明composer-cli已更新。但是当我运行createPeerAdminCard.sh
时,我仍然遇到了相同的日志输出。
我找不到检查 composer-cli 版本的方法。没有卡,这也意味着我无法继续安装composer运行时。非常感谢任何帮助。
请注意我没有按照安装指南进行操作 因为我编写了一个简单的业务网络, 导出 bna 文件,部署它并在其上播放 浏览器在8月份的某个时间回到游乐场。我想 通过为它生成REST服务器进一步实验。
答案 0 :(得分:0)
我在尝试更新composer-cli
时犯了一个错误。我应该运行npm install -g composer-cli
而不是错误地运行npm install composer-cli
。后一个命令以某种方式没有更新composer-cli
。
答案 1 :(得分:0)
我有同样的问题。我找到了这张github票:https://github.com/hyperledger/composer/issues/2714
基本上你不能使用节点版本6,但你也不能使用最新版本9.我做了一个干净的卸载并使用this gist进行安装。然后在安装节点再次和nvm。然后我确保安装 v8.9.1 ,是的不是v8.10.1,就像教程一样。
nvm install v8.9.1
nvm use 8.9.1 # telling nvm to use npm 8.9.1
npm install -g composer-cli --unsafe-perm
其他相关的作曲家包应附加为 npm install -g [package-name] --unsafe-perm
这对我有用,然后我就能跑了 ./createPeerAdminCard.sh composer runtime install --card PeerAdmin @ hlfv1 --businessNetworkName anh-tutorial-network
anh-tutorial-network 就是我所说的商业网络,但是这个例子的--businessNetworkName必须保持不变。
错误记录
./ createPeerAdminCard.sh Hyperledger Fabric控件的仅开发脚本 运行'createPeerAdminCard.sh' 假设hlfv1,FABRIC_VERSION未设置 假设15(秒)
,则取消设置FABRIC_START_TIMEOUT
Need to have composer-cli installed at version 0.16
akhs-MacBook-Pro:fabric-tools akh$ npm install -g composer-cli --save
npm WARN deprecated fs-promise@1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm ERR! path /usr/local/lib/node_modules/composer-cli/node_modules/grpc/node_modules/node-pre-gyp/npm-shrinkwrap.json
npm ERR! code ELOOP
npm ERR! errno -62
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open
'/usr/local/lib/node_modules/composer-cli/node_modules/grpc/node_modules/node-pre-gyp/npm-shrinkwrap.json'