【发布时间】:2018-08-02 16:57:21
【问题描述】:
我正在尝试使用 nodejs 和 Hyperledger-composer 构建示例应用程序。
我的系统是 Ubuntu 16.04。我使用 NVM 安装了 nodejs v8.10。 我正在关注官方 Hyperledger composer (check here) 的教程。
我遇到的问题在于我的“admin@borrow-network”业务网络的 connect() 函数:
this.businessNetworkDefinition = this.bizNetworkConnection.connect('admin@borrow-network');
我得到的错误如下:
错误:无法为连接类型“hlfv1”加载连接器模块“composer-connector-hlfv1”。必须使用 ConnectionProfileManager 实现来创建 ConnectionManager。
我尝试在 connect() 函数中包含其他参数:
.connect('PeerAdmin@hlfv1', 'admin@borrow-network','admin','adminpw');
然后它显示了一个不同的错误
UnhandledPromiseRejectionWarning:TypeError:无法在 cardStore.get.then(...././lib/businessnetworkconnection.js) 上的字符串“admin@borrow-network”上创建属性“cardName”
我做错了吗? 请,非常感谢任何帮助。
【问题讨论】:
标签: node.js hyperledger hyperledger-composer