0

我们正在创建一个需要使用 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,
}

有什么我们错过的导致错误的吗?

4

0 回答 0