while deploying contract on Ganache I'm getting this error
Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)
at Logger.makeError (/mnt/c/Codeeater/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
at Logger.throwError (/mnt/c/Codeeater/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
at EthersProviderWrapper.\<anonymous\> (/mnt/c/Codeeater/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:483:23)
at step (/mnt/c/Codeeater/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
at Object.throw (/mnt/c/Codeeater/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
at rejected (/mnt/c/Codeeater/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: 'could not detect network',
code: 'NETWORK_ERROR',
event: 'noNetwork'
}
error Command failed with exit code 1.
--> hardhat.confing.js file is
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
/\*\* @type import('hardhat/config').HardhatUserConfig \*/
const Sepolia_url = process.env.Sepolia_url;
const private_key = process.env.private_key;
const Ganache_url = process.env.Ganache_url;
const Ganache_private_key = process.env.Ganache_private_key;
module.exports = {
solidity: "0.8.17",
networks: {
sepolia: { url: Sepolia_url,
accounts: \[private_key\],
},
Ganache: {
url: Ganache_url,
accounts: \[Ganache_private_key\],
},
},
};
-->.env file is
Ganache_url = "HTTP://127.0.0.1:7545"
Ganache_private_key = "075d807fa06bcbb594c268c2f07a52cd4c9fe7d4f23b1e5e974a34cf6ba5c210"
-->Command I run is
yarn hardhat run --network Ganache scripts/major_project.js