Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:133:10)
at Hash.ripemd160 (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/crypto/hash.js:30:17)
at Hash.sha256ripemd160 (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/crypto/hash.js:35:15)
at HDPrivateKey._buildFromBuffers (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:488:26)
at HDPrivateKey._buildFromObject (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:376:15)
at new HDPrivateKey (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:61:10)
at HDPrivateKey.fromSeed (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:422:10)
at Mnemonic.toHDPrivateKey (/home/ubuntu/node-backend/node_modules/bitcore-mnemonic/lib/mnemonic.js:208:31)
at Function.fromMnemonic (/home/ubuntu/node-backend/node_modules/eth-hd-wallet/dist/index.js:64:69)
Is the full error. Happens on node v18.4.0, when I call EthHdWallet.fromMnemonic
const { EthHdWallet } = require("eth-hd-wallet"); is my import statement
Only way I've found to fix it is by downgrading node, but due to other packages in use, that's not a viable option for me.
Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:133:10) at Hash.ripemd160 (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/crypto/hash.js:30:17) at Hash.sha256ripemd160 (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/crypto/hash.js:35:15) at HDPrivateKey._buildFromBuffers (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:488:26) at HDPrivateKey._buildFromObject (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:376:15) at new HDPrivateKey (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:61:10) at HDPrivateKey.fromSeed (/home/ubuntu/node-backend/node_modules/bitcore-lib/lib/hdprivatekey.js:422:10) at Mnemonic.toHDPrivateKey (/home/ubuntu/node-backend/node_modules/bitcore-mnemonic/lib/mnemonic.js:208:31) at Function.fromMnemonic (/home/ubuntu/node-backend/node_modules/eth-hd-wallet/dist/index.js:64:69)