Search code examples
solidityhardhat

Using a version of Node.js that is not supported by Hardhat


I'm trying to deploy my first solidity contract using hardhat but I'm getting this error.

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
Error: insufficient funds for intrinsic transaction cost [ See: https://links.ethers.org/v5-errors-INSUFFICIENT_FUNDS ] (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.6.5)
    at Logger.makeError (C:\Users\nitda\Desktop\Hello-World\node_modules\@ethersproject\logger\src.ts\index.ts:261:28)
    at Logger.throwError (C:\Users\nitda\Desktop\Hello-World\node_modules\@ethersproject\logger\src.ts\index.ts:273:20)
    at checkError (C:\Users\nitda\Desktop\Hello-World\node_modules\@ethersproject\providers\src.ts\json-rpc-provider.ts:81:16)
    at C:\Users\nitda\Desktop\Hello-World\node_modules\@ethersproject\providers\src.ts\json-rpc-provider.ts:243:24
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  reason: 'insufficient funds for intrinsic transaction cost',
  code: 'INSUFFICIENT_FUNDS',
  error: ProviderError: insufficient funds for gas * price + value
      at HttpProvider.request (C:\Users\nitda\Desktop\Hello-World\node_modules\hardhat\src\internal\core\providers\http.ts:74:19)
      at LocalAccountsProvider.request (C:\Users\nitda\Desktop\Hello-World\node_modules\hardhat\src\internal\core\providers\accounts.ts:182:36)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at EthersProviderWrapper.send (C:\Users\nitda\Desktop\Hello-World\node_modules\@nomiclabs\hardhat-ethers\src\internal\ethers-provider-wrapper.ts:13:20),
  method: 'sendTransaction',
  transaction: undefined
}

Solution

  • I have recently just started with hard hat as well and was running Node.JS v17.XX when trying to get hard hat running it kept barking at me saying i needed ^12, ^14, ^16

    using the command ( in linux )
    nvm install 16 set nvm to run at version 16 node --version will show you your current version.

    After doing this I was able to run it successfully.

    Best of luck!