1

问题:

我已经克隆了 Hyperledger-Indy SDK 存储库,然后尝试运行 nodeJs 示例首先我发出命令npm run ledger: start,然后发出 npm install,然后在 nodejs 文件夹中发出 npm run start。之后我得到了

> samples@1.0.0 start /home/tharindu/indy-sdk/samples/nodejs
> node src/main.js

gettingStarted.js -> started
Open Pool Ledger: pool1
done
(node:4013) UnhandledPromiseRejectionWarning: IndyError: PoolLedgerTimeout
    at Object.callback (/home/tharindu/indy-sdk/samples/nodejs/node_modules/indy-sdk/src/wrapIndyCallback.js:15:10)
(node:4013) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4013) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

终端上的这个错误。有人可以帮我解决这个问题吗?我尝试了很多以找到解决此问题的方法,但我无法找到解决此问题的方法。谢谢你。

4

1 回答 1

1

问题是因为你没有启动 hiperledger Indy 的 pool ledger。我可以复制这个问题。

https://imgur.com/a/AK0WlV9

我已经安装了包含窗台的 docker,所以我使用 docker 运行池分类帐,使用以下命令:

sudo docker run -itd -p 9701-9708:9701-9708 indy_pool

如果您没有安装 docker 并运行 ledger,我向您推荐此链接,只需几个步骤:https ://medium.com/akeo-tech/step-by-step-guide-to-set-up-hyperledger -indy-64eeb524f558

于 2020-03-20T10:25:16.567 回答