-
Notifications
You must be signed in to change notification settings - Fork 184
Error HH303: Unrecognized task deploy #174
Comments
I'll suggest you also show us the error from the console |
Following is the error shown on the console while running the following command. yash@DESKTOP-RK1S1NU:~/BlockChain/Hardhat-fundme-fcc$ yarn hardhat deploy --tags mocks For more info go to https://hardhat.org/HH303 or run Hardhat with --show-stack-traces |
Try it this way then - the mocks should be “mocks”
|
Thank you but nothing changes still its showing the same error. |
try yarn add --dev deploy |
please add the following line to the top of the "hardhat.config.js" file: require("hardhat-deploy"); I have the same issue. Solved by this! |
Getting the issue while running command --> yarn hardhat deploy --tags mocks or yarn hardhat deploy
Can't find any task which has incorrect words.
Code of 00-deploy-mocks.js
const { network } = require("hardhat");
const { developmentChains, DECIMALS, INITIAL_ANSWER } = require("../helper-hardhat-config");
module.exports = async({getNamedAccounts, deployments}) => {
const {deploy, log} = deployments;
const { deployer} = await getNamedAccounts();
const chainId = network.config.chainId;
}
module.exports.tags = ["all", "mocks"];
Code of 01-deploy-mocks.js
//const { getNamedAccounts, deployments } = require("hardhat")
const { network } = require("hardhat");
const { networkconfig } = require("../helper-hardhat-config");
module.exports = async({getNamedAccounts, deployments}) => {
const {deploy, log} = deployments;
const { deployer} = await getNamedAccounts();
const chainId = network.config.chainId;
}
Searched everywhere but can't find the solution.
Can anybody please help?
The text was updated successfully, but these errors were encountered: