Issues with truffle

I’ve succesfully installed truffle on my laptop but my pc seems to have issues. When I execute the develop command npx truffle develop (the npx is required to find the command). Then I’m met with the following error:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at hash160 (C:\usr\local\node_modules\truffle\build\webpack:\node_modules\ethereum-cryptography\vendor\hdkey-without-crypto.js:249:1)
    at HDKey.set (C:\usr\local\node_modules\truffle\build\webpack:\node_modules\ethereum-cryptography\vendor\hdkey-without-crypto.js:50:1)
    at Function.HDKey.fromMasterSeed (C:\usr\local\node_modules\truffle\build\webpack:\node_modules\ethereum-cryptography\vendor\hdkey-without-crypto.js:194:1)
    at Function.EthereumHDKey.fromMasterSeed (C:\usr\local\node_modules\truffle\build\webpack:\node_modules\ethereumjs-wallet\dist\hdkey.js:16:1)
    at Object.getAccountsInfo (C:\usr\local\node_modules\truffle\build\webpack:\packages\core\lib\mnemonics\mnemonic.js:45:1)
    at Object.run (C:\usr\local\node_modules\truffle\build\webpack:\packages\core\lib\commands\develop.js:64:44)
    at Command.run (C:\usr\local\node_modules\truffle\build\webpack:\packages\core\lib\command.js:183:1)
Truffle v5.4.19 (core: 5.4.19)
Node v17.1.0

Any ideas on how to handle this?

1 Like

Hey @Lennart_Lucas, hope you are well.

Could be the Node version that you have, take a look into this quick guide to downgrade NodeJs to at least the version 10 or 12 (im using 12 since quite some time, no issues found so far).
https://studygroup.moralis.io/t/faq-how-to-downgrade-node-js/22908/3

Carlos Z

1 Like