You need to enable JavaScript to run this app. 本地Substrate节点对接@polkadot/api出现StorageKey初始化报错问询
优惠活动
大模型
产品
解决方案
定价
更多

本地Substrate节点对接@polkadot/api出现StorageKey初始化报错问询

本地运行Substrate节点的@polkadot/api连接报错问题

我按照官方入门教程在个人电脑本地运行了一个Substrate节点。该节点可通过两个路径访问:

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

想求助大家帮忙排查定位这个问题的解决方法。

内容的提问来源于stack exchange,提问作者Sarah Kay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.11.22 07:15:00