When this package is built into a CommonJS file, it still contains ES6 imports. From the latest version (0.2.4), the following lines will cause runners such as Jest (which assume node_modules as built CommonJS) to break:
import EventEmitter from 'eventemitter3';
import { PublicKey } from '@solana/web3.js';
import bs58 from 'bs58';
In the meantime, a workaround for anyone experiencing this is to add the following to your Jest configuration:
When this package is built into a CommonJS file, it still contains ES6 imports. From the latest version (
0.2.4
), the following lines will cause runners such as Jest (which assumenode_modules
as built CommonJS) to break:In the meantime, a workaround for anyone experiencing this is to add the following to your Jest configuration: