Closed Latrasis closed 1 year ago
I suspect this is because of "module": "commonjs"
; we're only exporting ESM now and I guess if you're asking typescript to compile to require('multiformats/cid')
etc. then that's not going to fly. You'll either need to use <10 or switch to one of the ESM compile targets.
Reproduced this in Electron 23 with ESM imports. It was due to using require.
Electron doesn't allow using import
for node modules which is a bit wonky. I'll post here if I find a workaround.
2023-02-21 maintainer conversation: unfortunatley we can't support this. We're only able to do ESM publishing, but we recognize that impacts certain toolchains haven't updated yet. v10 of multiformats should fine for you for now until Electron upgrades.
On installation
^11.0.0
or^10.0.0
and runningts-node
:v7.0.1
I get:
Using node version:
Node.js v18.13.0
Npm version:8.19.3
tsconfig.json
: