I installed following polkadot packages.
"@polkadot/api": "6.10.1",
"@polkadot/extension-dapp": "0.41.1",
"@polkadot/hw-ledger": "8.2.2",
"@polkadot/util-crypto": "8.0.2",
When run the "yarn start", I got this error.
./node_modules/@polkadot/util/u8a/toString.js
Attempted import error: 'TextDecoder' is not exported from '@polkadot/x-textdecoder'.
How can I fix that?
We had a similar issue when running
Jest
tests a while back, so we ended up just attaching TextEncoder to the global scope of the test environment as a workaround.The above code was loaded as the test environment in jest config like so: