title: Node.js that is not supported by Hardhat - error:0308010C:digital envelope routines::unsupported
body: <p>Every time I try to use a hardhat command (i.e. npx hardhat test) in my project, I get the following error:</p>
  <pre><code>You are using a version of Node.js that is not supported by Hardhat, and it may work incorrectly, or not work at all.
  
  Please, make sure you are using a supported version of Node.js.
  
  To learn more about which versions of Node.js are supported go to https://hardhat.org/nodejs-versions
  
  
    0 passing (0ms)
  
  An unexpected error occurred:
  
  Error: error:0308010C:digital envelope routines::unsupported
      at new Hash (node:internal/crypto/hash:67:19)
      at Object.createHash (node:crypto:133:10)
      at hash160 (/Users/mabeloza/abja/abja_webapp/src/node_modules/ethereum-cryptography/vendor/hdkey-without-crypto.js:249:21)
  ...
  
    opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
    library: 'digital envelope routines',
    reason: 'unsupported',
    code: 'ERR_OSSL_EVP_UNSUPPORTED'
  
  </code></pre>
  <p>I am using the following Hardhat dependencies in my nodeJS app and am using the nodeJS 18.1.0.</p>
  <pre><code>&quot;@nomiclabs/hardhat-ethers&quot;: &quot;^2.0.5&quot;,
  &quot;@nomiclabs/hardhat-etherscan&quot;: &quot;^3.0.3&quot;,
  &quot;@nomiclabs/hardhat-waffle&quot;: &quot;^2.0.3&quot;,
  </code></pre>
  <p>Which hardhat version should I use to be able to use the latest nodeJS? Or is there a specific nodeJS I need to use for hardhat?</p>