# Hardhat errors

This section contains a list of all the possible errors you may encounter when using Hardhat and an explanation of each of them.

# General errors

# HH1: You are not inside a Hardhat project

You are trying to run Hardhat outside of a Hardhat project.

You can learn how to use Hardhat by reading the Getting Started guide.

# HH2: Unsupported Node.js

Hardhat doesn't support your Node.js version.

Please upgrade your version of Node.js and try again.

# HH3: Unsupported operation

You are tying to perform an unsupported operation.

Unless you are creating a task or plugin, this is probably a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH4: Hardhat was already initialized

Hardhat initialization was executed twice. This is a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH5: Hardhat wasn't initialized

Hardhat initialization failed. This is a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH6: Hardhat Runtime Environment not created

Hardhat initialization failed. This is a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH7: Tried to create the Hardhat Runtime Environment twice

The Hardhat initialization process was executed twice. This is a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH8: Invalid Hardhat config

You have one or more errors in your config file.

Check the error message for details, or go to documentation(opens new window) to learn more.

# HH9: Failed to load config file

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 ofhardhat/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

# HH10: Attempted to modify the user's config

An attempt to modify the user's config was made.

This is probably a bug in one of your plugins.

Please report it(opens new window) to help us improve Hardhat.

# HH11: Invariant violation

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(opens new window) to help us improve Hardhat.

# HH12: Hardhat is not installed or installed globally

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.

# HH13: ts-node not installed

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

# HH14: typescript not installed

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

# HH100: Selected network doesn't exist

You are trying to run Hardhat with a non-existent network.

Read the documentation(opens new window) to learn how to define custom networks.

# HH101: Connected to the wrong network

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.

# HH102: Missing data param when calling eth_sign.

You called eth_sign with incorrect parameters.

Please check that you are sending a data parameter.

# HH103: Unrecognized account

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.

# HH104: Missing transaction parameter

You are trying to send a transaction with a locally managed account, and some parameters are missing.

Please double check your transactions' parameters.

# HH105: No remote accounts available

No local account was set and there are accounts in the remote node.

Please make sure that your Ethereum node has unlocked accounts.

# HH106: Invalid HD path

An invalid HD/BIP32 derivation path was provided in your config.

Read the documentation(opens new window) to learn how to define HD accounts correctly.

# HH107: Invalid JSON-RPC value

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.

# HH108: Cannot connect to the network

Cannot connect to the network.

Please make sure your node is running, and check your internet connection and networks config.

# HH109: Network timeout

One of your JSON-RPC requests timed-out.

Please make sure your node is running, and check your internet connection and networks config.

# HH110: Invalid JSON-RPC response

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.

# HH111: Could not derive an HD key

One of your HD keys could not be derived.

Try using another mnemonic or deriving less keys.

# HH112: Invalid JSON-RPC value

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.

# Task definition errors

# HH200: Could not add positional param

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.

# HH201: Repeated param name

Could not add a param to your task because its name is already used.

Please double check your task definitions.

# HH202: Hardhat and task param names clash

Could not add a param to your task because its name is used as a param for Hardhat.

Please double check your task definitions.

# HH203: Optional param followed by a required one

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.

# HH204: Tried to run task without an action

A task was run, but it has no action set.

Please double check your task definitions.

# HH205: runSuper not available

You tried to call runSuper from a non-overridden task.

Please use runSuper.isDefined to make sure that you can call it.

# HH206: Default value has incorrect type

One of your tasks has a parameter whose default value doesn't match the expected type.

Please double check your task definitions.

# HH207: Required parameter has a default value

One of your tasks has a required parameter with a default value.

Please double check your task definitions.

# HH208: Invalid casing in parameter name

Your parameter names must use camelCase.

Please double check your task definitions.

# HH209: Attempted to add mandatory params to an overridden task

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.

# HH210: Attempted to add positional params to an overridden task

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.

# HH211: Attempted to add variadic params to an overridden task

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.

# HH212: Invalid argument type

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.

# HH300: Invalid environment variable value

You are setting one of Hardhat arguments using an environment variable, but it has an incorrect value.

Please double check your environment variables.

# HH301: Invalid argument type

One of your Hardhat or task's arguments has an invalid type.

Please double check your arguments.

# HH302: Invalid file argument

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.

# HH303: Unrecognized task

Tried to run a non-existent task.

Please double check the name of the task you are trying to run.

# HH304: Unrecognized command line argument

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.

# HH305: Unrecognized param

Hardhat couldn't recognize one of your tasks' parameters.

Please double check how you invoked Hardhat or run your task.

# HH306: Missing task argument

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.

# HH307: Missing task positional argument

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.

# HH308: Unrecognized task positional argument

You tried to run a task with more positional arguments than needed.

Please double check how you invoked Hardhat or run your task.

# HH309: Repeated task parameter

You tried to run a task with a repeated parameter.

Please double check how you invoked Hardhat or run your task.

# HH310: Invalid casing in command line parameter

You tried to run hardhat with a parameter with invalid casing. They must be lowercase.

Please double check how you invoked Hardhat.

# HH311: Invalid JSON parameter

You tried to run a task with an invalid JSON parameter.

Please double check how you invoked Hardhat or run your task.

# HH312: Subtask run from the command line

You tried to run an subtask from the command line.

This is not supported. Please run the help task to see the available options.

# Dependencies resolution errors

# HH400: Solidity file not found

Tried to resolve a non-existing Solidity file as an entry-point.

# HH401: Solidity library not installed

One of your Solidity sources imports a library that is not installed.

Please double check your imports or install the missing dependency.

# HH402: Missing library file

One of your libraries' files was imported but doesn't exist.

Please double check your imports or update your libraries.

# HH403: Illegal Solidity import

One of your libraries tried to use a relative import to import a file outside of its scope.

This is disabled for security reasons.

# HH404: Imported file not found

One of your source files imported a non-existing one.

Please double check your imports.

# HH405: Invalid import: use / instead of \

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.

# HH406: Invalid import: trying to use an unsupported protocol

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.

# HH407: Invalid import: absolute paths unsupported

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.

# HH408: Invalid import: file outside of the project

A Solidity file is trying to import another one that is outside of the project.

This is not supported by Hardhat.

# HH409: Invalid import: wrong file casing

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.

# HH410: Incorrect source name casing

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.

# HH411: Invalid import: library not installed

A Solidity file is trying to import another which belongs to a library that is not installed.

Try installing the library using npm.

# HH500: Invalid solc version

The Solidity version in your config is invalid or hasn't been released yet.

Please double check your solc config.

# HH501: solc download failed

Couldn't download solc.

Please check your Internet connection.

# HH502: Couldn't obtain solc version list

Couldn't download solc's version list.

Please check your Internet connection.

# HH503: Downloaded solc checksum verification failed

Downloaded solc verification failed..

Please check your Internet connection.

# HH504: The solc compiler couldn't be obtained

Hardhat couldn't obtain a valid solc compiler.

Please report it(opens new window) to help us improve Hardhat.

# Built-in tasks errors

# HH600: Compilation failed

Your smart contracts failed to compile.

Please check Hardhat's output for more details.

# HH601: Script doesn't exist

Tried to use hardhat run to execut a non-existing script.

Please double check your script's path

# HH602: Error running script

Running a script resulted in an error.

Please check Hardhat's output for more details.

# HH603: Flatten detected cyclic dependencies

Hardhat flatten doesn't support cyclic dependencies.

We recommend not using this kind of dependencies.

# HH604: Error running JSON-RPC server

There was error while starting the JSON-RPC HTTP server.

# HH605: Unsupported network for JSON-RPC 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.

# HH606: The project cannot be compiled

The project cannot be compiled with the current settings.

# HH607: Missing fork URL

You passed a block number to fork from, but not URL. Hardhat cannot fork if the URL of the JSON-RPC weren't set.

# HH700: Artifact not found

Tried to import a non-existing artifact.

Please double check that your contracts have been compiled and your artifact's name.

# HH701: Multiple artifacts found

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.

# HH702: Incorrect artifact path casing

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.

# Plugin system errors

# HH800: Using a buidler plugin

You are trying to use a Buidler plugin in Hardhat. This is not supported.

Please use the equivalent Hardhat plugin instead.

# HH801: Plugin dependencies not installed

You are trying to use a plugin with unmet dependencies.

Please follow Hardhat's instructions to resolve this.

# Internal Hardhat errors

# HH900: Invalid error message template

An error message template contains an invalid variable name. This is a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH901: Invalid error message replacement

Tried to replace an error message variable with a value that contains another variable name. This is a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH902: Missing replacement value from error message template

An error message template is missing a replacement value. This is a bug.

Please report it(opens new window) to help us improve Hardhat.

# HH903: Inferred artifact path doesn't exist

The inferred artifact path doesn't exist.

Please report it(opens new window) to help us improve Hardhat.

# Source name errors

# HH1000: Invalid source name: absolute path

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.

# HH1001: Invalid source name: relative path

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.

# HH1002: Invalid source name: backslashes

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.

# HH1003: Invalid source name: not normalized

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.

# HH1004: Incorrect source name casing

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.

# HH1005: Solidity source file not found

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.

# HH1006: File from node_modules treated as local

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.

# HH1007: File from outside the project treated as local

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.

# Contract name errors

# HH1100: Invalid fully qualified contract name

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