【问题标题】:hyperledger-fabric "Writing your first Application" query.js step failshyperledger-fabric“编写你的第一个应用程序”query.js 步骤失败
【发布时间】:2017-07-18 18:02:22
【问题描述】:

步骤“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 clone 步骤之后,fabric-samples/fabcar 中没有文档中所述的“链码”,但在 fabric-samples 中有一个链码/fabcar。这似乎不会导致问题。 注意:“构建您的第一个网络”中的所有步骤均已顺利完成。

【问题讨论】:

  • 彼得,感谢您的提问。您能否提供有关您的环境的其他信息?你运行的是什么版本的节点?哪个操作系统和什么版本?我刚刚运行了 fabcar 示例,没有问题。
  • 节点 4.2.6,npm 3.10.10,在 ubuntu xenial 上运行
  • 安装节点版本 6.11.1 并重新运行。新错误:
  • module.js:597 return process.dlopen(module, path._makeLong(filename)); ^ 错误:模块版本不匹配。预期 48,得到 46。
  • 您应该尝试删除 node_modules 树并重新运行 npm install。

标签: node.js hyperledger-fabric


【解决方案1】:

Hyperledger Fabric 1.0 已针对 Node.js 版本 >= 6.9 和 npm install,则应删除 node_modules 树并重新运行 npm install 以确保安装正确的依赖项。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-05-21
    • 1970-01-01
    • 2019-07-08
    • 2019-07-26
    • 2016-10-16
    • 2018-12-08
    • 2016-05-09
    相关资源
    最近更新 更多