问题描述
我们正在创建一个需要使用 bip32 包的具有 svelte 和 sNowpack 的应用程序。但是,当我们尝试运行 node.derivePath(
m/44'/60'/0')
时,我们会收到以下错误:
Uncaught (in promise) TypeError: Cannot set property 'needReadable' of undefined
at RIPEMD160.Transform$3 (browser-ae6b73e4.js:3555)
at RIPEMD160.HashBase (browser-ae6b73e4.js:3780)
at new RIPEMD160 (browser-ae6b73e4.js:4050)
at createHash (browser-ae6b73e4.js:7516)
at Object.hash160 (bip32.js:125)
at BIP32.get identifier [as identifier] (bip32.js:1269)
at BIP32.get fingerprint [as fingerprint] (bip32.js:1272)
at BIP32.derive (bip32.js:1355)
at BIP32.deriveHardened (bip32.js:1372)
at bip32.js:1386
在 sNowpack.config.js
中,我们有以下设置:
mount: {
public: { url: '/',static: true },src: { url: '/dist' },},plugins: [
'@sNowpack/plugin-svelte','@sNowpack/plugin-dotenv','@sNowpack/plugin-typescript','@sNowpack/plugin-postcss','@sNowpack/plugin-webpack',],routes: [],optimize: {},packageOptions: {
polyfillNode: true,}
我们是否遗漏了什么导致错误?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)