我是npm and hyperledger fabric-composer的新手 问题:我的设置有什么问题?调查和解决此类错误的策略是什么?
我做了什么:
执行npm install会导致(不知道此信息是否足够):
[...]
File "/usr/local/lib/python2.7/dist-packages/docker/transport/ssladapter.py", line 22, in <module>
urllib3.connection.match_hostname = match_hostname
AttributeError: 'module' object has no attribute 'connection'
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/home/mjh/.nvm/versions/node/v4.6.2/bin/node" "/home/mjh/.nvm/versions/node/v4.6.2/bin/npm" "install"
npm ERR! node v4.6.2
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! getting-started@1.0.0 install: `scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the getting-started@1.0.0 install script 'scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the getting-started package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! scripts/download-hyperledger.sh && scripts/start-hyperledger.sh && npm run deployNetwork
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs getting-started
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls getting-started
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/mjh/sample-applications/packages/getting-started/npm-debug.log
请参阅链接以获取详细的npm-debug.log文件 https://gist.github.com/mjh-halder/9fe473b44f0a731c996bbc5754011013
答案 0 :(得分:1)
我之前在trusty(14.04)上看到过这个问题,并且与python的过时urllib3库有关,它由docker compose使用。 根据您安装的pip版本,您可以按如下方式更新urllib库
pip install --upgrade pip
pip install -U urllib3
答案 1 :(得分:0)
您缺少权限,因此您需要执行sudo npm-install ...
答案 2 :(得分:0)
此处的问题与安装脚本的最后一部分有关 - 这是安装docker-compose
工具的部分。今天在干净的Ubuntu 14.04 LTS映像上进行测试,这就是原因。
我建议按照docker网站上的说明安装docker-compose
。 (https://docs.docker.com/compose/install/)
实际上这是
curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o
chmod +x /usr/local/bin/docker-compose
运行docker-compose --version
以检查它是否已正确安装
$ docker-compose --version
docker-compose version: 1.10.0
然后像以前一样运行其余的Fabric Composer脚本。
我们正在更新脚本 - 但这应该让你去。