This section contains a list of all the possible errors you may encounter when using Hardhat and an explanation of each of them.
You are trying to run Hardhat outside of a Hardhat project.
You can learn how to use Hardhat by reading the Getting Started guide.
Hardhat doesn't support your Node.js version.
Please upgrade your version of Node.js and try again.
You are tying to perform an unsupported operation.
Unless you are creating a task or plugin, this is probably a bug.
Please report it to help us improve Hardhat.
Hardhat initialization was executed twice. This is a bug.
Please report it to help us improve Hardhat.
Hardhat initialization failed. This is a bug.
Please report it to help us improve Hardhat.
Hardhat initialization failed. This is a bug.
Please report it to help us improve Hardhat.
The Hardhat initialization process was executed twice. This is a bug.
Please report it to help us improve Hardhat.
You have one or more errors in your config file.
Check the error message for details, or go to documentation to learn more.
There was an error while loading your config file.
The most common source of errors is trying to import the Hardhat Runtime Environment from your config or a file imported from it. This is not possible, as Hardhat can't be initialized while its config is being defined.
You may also have accidentally imported hardhat' instead of
hardhat/config`.
Please make sure your config file is correct.
To learn more about how to access the Hardhat Runtime Environment from different contexts go to https://hardhat.org/hre
An attempt to modify the user's config was made.
This is probably a bug in one of your plugins.
Please report it to help us improve Hardhat.
An internal invariant was violated. This is probably caused by a programming error in hardhat or in one of the used plugins.
Please report it to help us improve Hardhat.
You tried to run Hardhat from a global installation or not installing it at all. This is not supported.
Please install Hardhat locally using npm or Yarn, and try again.
You are running a Hardhat project that uses typescript, but you haven't installed ts-node.
Please run this and try again: npm install --save-dev ts-node
You are running a Hardhat project that uses typescript, but it's not installed.
Please run this and try again: npm install --save-dev typescript
You are trying to run Hardhat with a non-existent network.
Read the documentation to learn how to define custom networks.
Your config specifies a chain id for the network you are trying to used, but Hardhat detected anotherone.
Please make sure you are setting your config correctly.
data
param when calling eth_sign.You called eth_sign
with incorrect parameters.
Please check that you are sending a data
parameter.
You are trying to send a transaction or sign some data with an account not managed by your Ethereum node nor Hardhat.
Please double check your accounts and the from
parameter in your RPC calls.
You are trying to send a transaction with a locally managed account, and some parameters are missing.
Please double check your transactions' parameters.
No local account was set and there are accounts in the remote node.
Please make sure that your Ethereum node has unlocked accounts.
An invalid HD/BIP32 derivation path was provided in your config.
Read the documentation to learn how to define HD accounts correctly.
One of your transactions sent or received an invalid JSON-RPC QUANTITY value.
Please double check your calls' parameters and keep your Ethereum node up to date.
Cannot connect to the network.
Please make sure your node is running, and check your internet connection and networks config.
One of your JSON-RPC requests timed-out.
Please make sure your node is running, and check your internet connection and networks config.
One of your JSON-RPC requests received an invalid response.
Please make sure your node is running, and check your internet connection and networks config.
One of your HD keys could not be derived.
Try using another mnemonic or deriving less keys.
One of your calls sent or received an invalid JSON-RPC DATA value.
Please double check your calls' parameters and keep your Ethereum node up to date.
Could add a positional param to your task because there is already a variadic positional param and it has to be the last positional one.
Please double check your task definitions.
Could not add a param to your task because its name is already used.
Please double check your task definitions.
Could not add a param to your task because its name is used as a param for Hardhat.
Please double check your task definitions.
Could not add param to your task because it is required and it was added after an optional positional param.
Please double check your task definitions.
A task was run, but it has no action set.
Please double check your task definitions.
runSuper
not availableYou tried to call runSuper
from a non-overridden task.
Please use runSuper.isDefined
to make sure that you can call it.
One of your tasks has a parameter whose default value doesn't match the expected type.
Please double check your task definitions.
One of your tasks has a required parameter with a default value.
Please double check your task definitions.
Your parameter names must use camelCase.
Please double check your task definitions.
You can't add mandatory (non optional) param definitions in an overridden task. The only supported param additions for overridden tasks are flags, and optional params.
Please, double check your task definitions.
You can't add positional param definitions in an overridden task. The only supported param additions for overridden tasks are flags, and optional params.
Please, double check your task definitions.
You can't add variadic param definitions in an overridden task. The only supported param additions for overridden tasks are flags, and optional params.
Please, double check your task definitions.
Tasks that can be invoked from the command line require CLIArgumentType types for their arguments.
What makes these types special is that they can be represented as strings, so you can write them down in the terminal.
You are setting one of Hardhat arguments using an environment variable, but it has an incorrect value.
Please double check your environment variables.
One of your Hardhat or task's arguments has an invalid type.
Please double check your arguments.
One of your tasks expected a file as an argument, but you provided a non-existent or non-readable file.
Please double check your arguments.
Tried to run a non-existent task.
Please double check the name of the task you are trying to run.
Hardhat couldn't recognize one of your command line arguments.
This may be because you are writing it before the task name. It should come after it.
Please double check how you invoked Hardhat.
Hardhat couldn't recognize one of your tasks' parameters.
Please double check how you invoked Hardhat or run your task.
You tried to run a task, but one of its required arguments was missing.
Please double check how you invoked Hardhat or run your task.
You tried to run a task, but one of its required arguments was missing.
Please double check how you invoked Hardhat or run your task.
You tried to run a task with more positional arguments than needed.
Please double check how you invoked Hardhat or run your task.
You tried to run a task with a repeated parameter.
Please double check how you invoked Hardhat or run your task.
You tried to run hardhat with a parameter with invalid casing. They must be lowercase.
Please double check how you invoked Hardhat.
You tried to run a task with an invalid JSON parameter.
Please double check how you invoked Hardhat or run your task.
You tried to run an subtask from the command line.
This is not supported. Please run the help task to see the available options.
Tried to resolve a non-existing Solidity file as an entry-point.
One of your Solidity sources imports a library that is not installed.
Please double check your imports or install the missing dependency.
One of your libraries' files was imported but doesn't exist.
Please double check your imports or update your libraries.
One of your libraries tried to use a relative import to import a file outside of its scope.
This is disabled for security reasons.
One of your source files imported a non-existing one.
Please double check your imports.
A Solidity file is trying to import another one with its relative path and is using backslashes () insteado of slashes (/).
You must always use slashes (/) in Solidity imports.
A Solidity file is trying to import another one using an unsupported protocol, like http.
You can only import files thar are available locally or installed through npm.
A Solidity file is trying to import another one using its absolute path.
This is not supported, as it would lead to hard to reproduce compilations.
A Solidity file is trying to import another one that is outside of the project.
This is not supported by Hardhat.
A Solidity file is trying to import another one but its source name casing was wrong.
Hardhat's compiler is case sensitive to ensure projects are portable across different operating systems.
You tried to resolve a Solidity file with an incorrect casing.
Hardhat's compiler is case sensitive to ensure projects are portable across different operating systems.
A Solidity file is trying to import another which belongs to a library that is not installed.
Try installing the library using npm.
solc
versionThe Solidity version in your config is invalid or hasn't been released yet.
Please double check your solc
config.
solc
download failedCouldn't download solc
.
Please check your Internet connection.
solc
version listCouldn't download solc
's version list.
Please check your Internet connection.
solc
checksum verification failedDownloaded solc
verification failed..
Please check your Internet connection.
Hardhat couldn't obtain a valid solc compiler.
Please report it to help us improve Hardhat.
Your smart contracts failed to compile.
Please check Hardhat's output for more details.
Tried to use hardhat run
to execut a non-existing script.
Please double check your script's path
Running a script resulted in an error.
Please check Hardhat's output for more details.
Hardhat flatten doesn't support cyclic dependencies.
We recommend not using this kind of dependencies.
There was error while starting the JSON-RPC HTTP server.
JSON-RPC server can only be started when running the Hardhat Network.
To start the JSON-RPC server, retry the command without the --network parameter.
The project cannot be compiled with the current settings.
You passed a block number to fork from, but not URL. Hardhat cannot fork if the URL of the JSON-RPC weren't set.
Tried to import a non-existing artifact.
Please double check that your contracts have been compiled and your artifact's name.
There are multiple artifacts that match the given contract name, and Hardhat doesn't know which one to use.
Please use the fully qualified name of the contract to disambiguate it.
You tried to get an artifact file with an incorrect casing.
Hardhat's artifact resolution is case sensitive to ensure projects are portable across different operating systems.
You are trying to use a Buidler plugin in Hardhat. This is not supported.
Please use the equivalent Hardhat plugin instead.
You are trying to use a plugin with unmet dependencies.
Please follow Hardhat's instructions to resolve this.
An error message template contains an invalid variable name. This is a bug.
Please report it to help us improve Hardhat.
Tried to replace an error message variable with a value that contains another variable name. This is a bug.
Please report it to help us improve Hardhat.
An error message template is missing a replacement value. This is a bug.
Please report it to help us improve Hardhat.
The inferred artifact path doesn't exist.
Please report it to help us improve Hardhat.
A Solidity source name was expected, but an absolute path was given.
If you aren't overriding compilation-related tasks, please report this as a bug.
A Solidity source name was expected, but a relative path was given.
If you aren't overriding compilation-related tasks, please report this as a bug.
A Solidity source name was invalid because it uses backslashes () instead of slashes (/).
If you aren't overriding compilation-related tasks, please report this as a bug.
A Solidity source name was invalid because it wasn't normalized. It probably contains some "." or "..".
If you aren't overriding compilation-related tasks, please report this as a bug.
You tried to resolve a Solidity file with an incorrect casing.
Hardhat's compiler is case sensitive to ensure projects are portable across different operating systems.
A source name should correspond to an existing Solidity file but it doesn't.
Hardhat's compiler is case sensitive to ensure projects are portable across different operating systems.
A file was treated as local but is inside a node_modules directory.
If you aren't overriding compilation-related tasks, please report this as a bug.
A file was treated as local but is outside the project.
If you aren't overriding compilation-related tasks, please report this as a bug.
A contract name was expected to be in fully qualified form, but it's not.
A fully qualified name should look like file.sol:Contract