使用 Hardhat 不支持的 Node.js 版本
Using a version of Node.js that is not supported by Hardhat
我正在尝试使用 hardhat 部署我的第一个 solidity 合约,但出现此错误。
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
}
我最近也刚开始戴安全帽 运行宁 Node.JS v17.XX 想戴安全帽时 运行宁它一直冲我叫说我需要 ^12, ^14, ^16
使用命令(在 linux 中)
nvm install 16
在版本 16 将 nvm 设置为 运行
node --version
将显示您当前的版本。
完成此操作后,我能够 运行 成功。
祝你好运!
我正在尝试使用 hardhat 部署我的第一个 solidity 合约,但出现此错误。
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
}
我最近也刚开始戴安全帽 运行宁 Node.JS v17.XX 想戴安全帽时 运行宁它一直冲我叫说我需要 ^12, ^14, ^16
使用命令(在 linux 中)
nvm install 16
在版本 16 将 nvm 设置为 运行
node --version
将显示您当前的版本。
完成此操作后,我能够 运行 成功。
祝你好运!