问题描述
按照本教程,我的PC上本地运行了一个Substrate节点。 https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/interact。可以在两个端口上查看它:
Local: http://localhost:8000/substrate-front-end-template
On Your Network: http://192.168.56.1:8000/substrate-front-end-template
所以我认为连接不是问题。
无论如何,我通过以下命令将@ polkadot / api绑定到我的节点:
yarn add @polkadot/api
。
每当我运行节点时,浏览器中都会出现错误:
Error Connecting to Substrate
Error: FATAL: Unable to initialize the API: createType(StorageKey):: Derived TypedArray constructor created an array which was too small
有人可以帮忙吗?
解决方法
升级到最新的 Substrate Sidecar API 为我解决了这些问题。