paulmillr / noble-hashes

Audited & minimal JS implementation of hash functions, MACs and KDFs.
https://paulmillr.com/noble
MIT License
545 stars 46 forks source link

v1.3.0 doesn't build in React Gatsby #60

Closed culda closed 1 year ago

culda commented 1 year ago

Description I have a Gatsby/yarn v3 app and it doesn't build the latest bip32 and bip39 libraries. The issue is with v1.3.0 of noble-hashes that they both depend on, more specifically with the ESM syntax import * as nc from 'node:crypto'.

image

Solution The solution for me currently is

"resolutions": {
   "@noble/hashes": "1.2.0",
}
paulmillr commented 1 year ago

There is no issue with noble-crypto. The issue is with your bundler config. Adjust it properly or report to its repo.