Error HH8: There's one or more errors in your config file: #5182
Answered
by
alymurtazamemon
NakeshTewari
asked this question in
Q&A
-
After changing the compiler version of solidity to solidity: {
compilers: [{ versions: "0.8.8" }, { versions: "0.6.6" }],
}, On running - yarn hardhat compile. The HH8: error occurred. I am currently at lesson 7: 10:39:54 * Invalid value {"compilers":[{"versions":"0.8.8"},{"versions":"0.6.6"}]} for HardhatConfig.solidity.0 - Expected a value of type string.
* Invalid value undefined for HardhatConfig.solidity.1.version - Expected a value of type string.
* Invalid value undefined for HardhatConfig.solidity.2.compilers.0.version - Expected a value of type string.
* Invalid value undefined for HardhatConfig.solidity.2.compilers.1.version - Expected a value of type string.
To learn more about Hardhat's configuration, please go to https://hardhat.org/config/
require("@nomiclabs/hardhat-etherscan")
require("@nomiclabs/hardhat-waffle")
require("hardhat-gas-reporter")
require("solidity-coverage")
require("hardhat-deploy")
require("dotenv").config()
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
//solidity: "0.8.8",
solidity: {
compilers: [{ versions: "0.8.8" }, { versions: "0.6.6" }],
},
defaultNetwork: "hardhat",
networks: {
ropsten: {
url: process.env.ROPSTEN_URL || "",
accounts: [],
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: "USD",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
namedAccounts: {
deployer: {
deployer: 0,
},
},
user: {
default: 1,
},
} |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Mar 29, 2023
Replies: 1 comment
-
@NakeshTewari It is version not versions solidity: {
compilers: [
{
version: "0.8.8",
},
{
version: "0.6.6",
},
],
}, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
NakeshTewari
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@NakeshTewari It is version not versions