无法按照 Hyperledger Composer 教程创建 PeerAdminCard
Unable to create PeerAdminCard following Hyperledger Composer tutorial
我无法在 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 是 python 3 通过 anaconda 设置的。
....
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 运行time。非常感谢任何帮助。
Please note I am not following the tutorial from installation to this
point because I have had coded up a simple business network,
exported the bna file, deployed it and played with it on the
playground in the browser some time back in August. I'd like to
further the experiment by generating a REST server for it.
我尝试更新 composer-cli
时犯了一个错误。我应该 运行 npm install -g composer-cli
而不是错误地 运行ning npm install composer-cli
。后一个命令不知何故没有更新 composer-cli
.
我有同样的问题。我找到了这张 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 运行time install --card PeerAdmin@hlfv1 --businessNetworkName anh-tutorial-network
anh-tutorial-network 是我所说的我的业务网络,但是 --businessNetworkName 在这个例子中必须保持不变。
错误日志
./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 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'
我无法在 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 是 python 3 通过 anaconda 设置的。
....
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 运行time。非常感谢任何帮助。
Please note I am not following the tutorial from installation to this point because I have had coded up a simple business network, exported the bna file, deployed it and played with it on the playground in the browser some time back in August. I'd like to further the experiment by generating a REST server for it.
我尝试更新 composer-cli
时犯了一个错误。我应该 运行 npm install -g composer-cli
而不是错误地 运行ning npm install composer-cli
。后一个命令不知何故没有更新 composer-cli
.
我有同样的问题。我找到了这张 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 运行time install --card PeerAdmin@hlfv1 --businessNetworkName anh-tutorial-network
anh-tutorial-network 是我所说的我的业务网络,但是 --businessNetworkName 在这个例子中必须保持不变。
错误日志
./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 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'