hyperledger-fabric "Writing your first Application" query.js 步骤失败
hyperledger-fabric "Writing your first Application" query.js step fails
步骤 "git clone..."、"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",如文档中所述,但在 fabric-samples 中有一个 chaincode/fabcar .这似乎不会引起问题。
注意:"Building Your First Network" 中的所有步骤都已顺利完成。
Hyperledger Fabric 1.0 已针对 Node.js 版本 >= 6.9 和 < 7.x 进行了测试。如果出现类似错误,建议更新 Node.js 的版本(或使用 nvm 等版本管理器)并重试。如果您已经 运行 npm install
使用旧版本的 Node,您应该删除 node_modules 树并重新 运行 npm install
以确保您正在安装正确的依赖关系。
步骤 "git clone..."、"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",如文档中所述,但在 fabric-samples 中有一个 chaincode/fabcar .这似乎不会引起问题。 注意:"Building Your First Network" 中的所有步骤都已顺利完成。
Hyperledger Fabric 1.0 已针对 Node.js 版本 >= 6.9 和 < 7.x 进行了测试。如果出现类似错误,建议更新 Node.js 的版本(或使用 nvm 等版本管理器)并重试。如果您已经 运行 npm install
使用旧版本的 Node,您应该删除 node_modules 树并重新 运行 npm install
以确保您正在安装正确的依赖关系。