hyperledger-fabric“编写你的第一个应用程序”query.js步骤失败

步骤“git克隆…”,“startFabric.sh”和“npm.install”完成,没有错误。 “node query.js”的结果是:

Set wallet path, and associate user PeerAdmin with application error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: TypeError: this is not a typed array. at Function.from (native) at importKey (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26) at fromString (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28) at /home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22 error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: TypeError: this is not a typed array. at Function.from (native) at importKey (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26) at fromString (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28) at /home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22 Caught Error [TypeError: this is not a typed array.] 

注意:在git克隆步骤之后,在文档中描述的fabric-samples / fabcar中没有“chaincode”,但是织物样本中存在chaincode / fabcar。 这似乎不会造成问题。 注意:“build立您的第一个networking”中的所有步骤完成没有问题。

Hyperledger Fabric 1.0已经针对Node.js版本> = 6.9和<7.x进行了testing。 如果出现类似的错误,build议更新Node.js的版本(或使用版本pipe理器,如nvm),然后重新尝试。 如果已经使用旧版本的节点运行npm install ,则应删除node_modules树并重新运行npm install ,以确保安装正确的依赖关系。