bitcoinjs / bitcoinjs-lib

A javascript Bitcoin library for node.js and browsers.
MIT License
5.71k stars 2.11k forks source link

BIP174 error caused CommonJS require to fail #2166

Closed koa202405 closed 2 months ago

koa202405 commented 2 months ago

Why you decide to set "type": "module", in package.json, this a huge broken change.

Edit (by @junderw) for context:

junderw commented 2 months ago

Can you be more specific about your issue?

Edit: Figured out the underlying issue. Next time please be more specific.

junderw commented 2 months ago

I fixed the issue in bip174 causing the error.

https://github.com/bitcoinjs/bip174/releases/tag/v3.0.0-rc.1

Since bitcoinjs-lib uses ^ dependencies, a re-install (or refresh of lockfile if you install from lockfiles) of bitcoinjs-lib will fix the issue.