When compiling the hardhat project When it's showing Nothing to Compile.
{
"name": "HardhAtToken",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"chai": "^4.3.6",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.6.6",
"hardhat": "^2.9.6-dev.1"
},
"dependencies": {
"glob": "^7.2.0"
}
}
Hardhat keeps a cache of compiled contracts in the cache project folder.
The npx hardhat compile command only compiles files that have not been changed since the last compilation. So the "nothing to compile" message is expected in your case.
You can either clear the cache using npx hardhat clean, or force recompilation of cached sources using the npx hardhat compile --force argument.
Docs: https://hardhat.org/guides/compile-contracts.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With