尝试在 OSX 上部署 bna 文件时 Fabric Composer 快速启动失败

Fabric Composer quick-start failing when trying to deploy the bna file on OSX

我在尝试使用 fabric composer 部署 bna 文件时遇到了一些问题。首先,我尝试使用我自己的 HyperLedger 0.6 实例,创建连接配置文件,然后使用 composer-cli 部署 bna,在 composer network deploy 命令期间出现以下错误:"TypeError: Cannot read property 'fail' of undefined" 然后我删除了我所有的 docker 图像和容器,确保所有内容都已更新,然后我尝试了入门脚本,但我得到了完全相同的错误。 我遵循的步骤如下:

在 npm 安装期间生成的来自 vp0 的 docker 日志显示没有明显的连接错误,初始化后它只是重复以下消息:

    15:07:22.039 [peer] ensureConnected -> DEBU 31d Touch service indicates no dropped connections
    15:07:22.039 [peer] ensureConnected -> DEBU 31e Connected to: []
    15:07:22.039 [peer] ensureConnected -> DEBU 31f Discovery knows about: []

这是我执行后得到的日志文件:

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node',
    1 verbose cli   '/usr/local/bin/npm',
    1 verbose cli   'run',
    1 verbose cli   'deployNetwork' ]
    2 info using npm@4.4.4
    3 info using node@v6.10.0
    4 verbose run-script [ 'predeployNetwork', 'deployNetwork', 'postdeployNetwork' ]
    5 info lifecycle getting-started@1.0.0~predeployNetwork: getting-started@1.0.0
    6 silly lifecycle getting-started@1.0.0~predeployNetwork: no script for predeployNetwork, continuing
    7 info lifecycle getting-started@1.0.0~deployNetwork: getting-started@1.0.0
    8 verbose lifecycle getting-started@1.0.0~deployNetwork: unsafe-perm in lifecycle true
    9 verbose lifecycle getting-started@1.0.0~deployNetwork: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started/node_modules/.bin:/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/Users/raullaprida/gospace/bin
    10 verbose lifecycle getting-started@1.0.0~deployNetwork: CWD: /Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started
    11 silly lifecycle getting-started@1.0.0~deployNetwork: Args: [ '-c',
    11 silly lifecycle   'composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d' ]
    12 silly lifecycle getting-started@1.0.0~deployNetwork: Returned: code: 1  signal: null
    13 info lifecycle getting-started@1.0.0~deployNetwork: Failed to exec deployNetwork script
    14 verbose stack Error: getting-started@1.0.0 deployNetwork: `composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d`
    14 verbose stack Exit status 1
    14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at EventEmitter.emit (events.js:191:7)
    14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at ChildProcess.emit (events.js:191:7)
    14 verbose stack     at maybeClose (internal/child_process.js:877:16)
    14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    15 verbose pkgid getting-started@1.0.0
    16 verbose cwd /Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started
    17 verbose Darwin 16.5.0
    18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "deployNetwork"
    19 verbose node v6.10.0
    20 verbose npm  v4.4.4
    21 error code ELIFECYCLE
    22 error errno 1
    23 error getting-started@1.0.0 deployNetwork: `composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d`
    23 error Exit status 1
    24 error Failed at the getting-started@1.0.0 deployNetwork script 'composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d'.
    24 error Make sure you have the latest version of node.js and npm installed.
    24 error If you do, this is most likely a problem with the getting-started package,
    24 error not with npm itself.
    24 error Tell the author that this fails on your system:
    24 error     composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d
    24 error You can get information on how to open an issue for this project with:
    24 error     npm bugs getting-started
    24 error Or if that isn't available, you can get their info via:
    24 error     npm owner ls getting-started
    24 error There is likely additional logging output above.
    25 verbose exit [ 1, true ]

我遇到了同样的问题,但是在删除了我所有的容器和图像之后,入门示例工作正常。我使用的 Docker 和 OSX 版本与你相同,npm 版本是 4.4.4,node 版本是 6.9.5。没有连接配置文件。我建议您也这样做,删除所有容器、图像和连接配置文件,然后重试。