首页 > 解决方案 > 无法在 hyperledger fabric 1.1 上启动 composer 19.x

问题描述

在使用 composer 执行安装两个 org 设置的步骤时,我在第 17 步遇到错误,即composer network start命令:

Error: 2 UNKNOWN: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN

我已经为 npm 设置了代理,我也可以下载节点包。我尝试使用-o npmrcFile=/tmp/composer/npmConfig参数以及具有以下内容的 npmconfig 文件:

proxy="http://xxx.xx.xx.xx:xxxx/"
https-proxy="http://xxx.xx.xx.xx:xxxx/"
registry = "http://registry.npmjs.org/"
strict-ssl=false

但仍然没有运气。内部日志越来越

  7 http fetch GET 404 https://registry.npmjs.org/hyperledger-composer
  8 silly fetchPackageMetaData error for hyperledger-composer@latest 404  Not Found: hyperledger-composer@latest

标签: hyperledger-fabrichyperledger-composer

解决方案


诊断和解决问题的一个好方法是基于 Composer 尝试构建的 Image 创建一个测试容器,然后在该容器中测试 npm 并解决 npmrc 配置问题。这些命令应该会有所帮助:

docker run -it --name npmtest --network composer_default --entrypoint "/bin/sh" hyperledger/fabric-ccenv:x86_64-1.1.0

npm install composer-runtime...

exit

docker rm npmtest


推荐阅读