Remember we’re using Node. I don’t think TypeScript compiler supports importing ESM into CommonJS files.
Basically we will have to move the library to ESM and then use a bundler like esbuild to compile it to CJS as well for compatibility. It’s a mess