my2-fund_me-hh\deployments\localhost , this folder contain deployed files completely as figure below.
The problem is about node_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:447:11)
But if I deploy to Ganache or TestNet, It works well.
this is my enviroment on window laptop
node=v16.15.0
npx=1.22.19
yarn=8.5.5
hardhat =2.9.7
This is error on VS Code
Once I start the hardhat node , it deployed all of the files in the deploy folder
run yarn hardhat node
`
D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh>yarn hardhat node
yarn run v1.22.19
$ D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules.bin\hardhat node
Nothing to compile
Local network detected! Deploying mocks...
deploying "MockV3Aggregator" (tx: 0x2f60bd4cba5dffe33cd22380f4891cfadb7f13aad763bb084e8a1c3336b892f9)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 569635 gas
Mocks Deployed!
You are deploying to a local network, you'll need a local network running to interact
Run (npx hardhat console) to interact with the deployed smart contracts!
31337
Get MockV3Aggregator for fake price feed.
deploying "FundMe" (tx: 0x24bdce76b4c5093ca6c0383261efdb88f061990bc2fb1bb40a37287d724abfcf)...: deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 with 1058239 gas
FundMe deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/
Accounts
WARNING: These accounts, and their private keys, are publicly known.
Any funds sent to them on Mainnet or any other live network WILL BE LOST.
`
yarn run v1.22.19
$ D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules.bin\hardhat run scripts/myfund.js
### Error: No Contract deployed with name FundMe
at Object.getContract (D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:447:11)
at main (D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\scripts\myfund.js:10:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I refer to https://github.com/PatrickAlphaC/hardhat-fund-me-fcc/issues/63 I keep getting the same error this is what I've done as your recommendation.
my2-fund_me-hh\deployments\localhost , this folder contain deployed files completely as figure below.
The problem is about node_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:447:11)
But if I deploy to Ganache or TestNet, It works well.
this is my enviroment on window laptop node=v16.15.0 npx=1.22.19 yarn=8.5.5 hardhat =2.9.7
This is error on VS Code
Once I start the hardhat node , it deployed all of the files in the deploy folder
run yarn hardhat node ` D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh>yarn hardhat node yarn run v1.22.19 $ D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules.bin\hardhat node Nothing to compile Local network detected! Deploying mocks... deploying "MockV3Aggregator" (tx: 0x2f60bd4cba5dffe33cd22380f4891cfadb7f13aad763bb084e8a1c3336b892f9)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 569635 gas Mocks Deployed!
You are deploying to a local network, you'll need a local network running to interact Run (npx hardhat console) to interact with the deployed smart contracts!
31337 Get MockV3Aggregator for fake price feed. deploying "FundMe" (tx: 0x24bdce76b4c5093ca6c0383261efdb88f061990bc2fb1bb40a37287d724abfcf)...: deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 with 1058239 gas FundMe deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/
Accounts
WARNING: These accounts, and their private keys, are publicly known. Any funds sent to them on Mainnet or any other live network WILL BE LOST.
Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH) Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
`
` yarn run v1.22.19 $ D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules.bin\hardhat run scripts/myfund.js ### Error: No Contract deployed with name FundMe at Object.getContract (D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:447:11) at main (D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\scripts\myfund.js:10:18) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
`