Getting error on running yarn hardhat deploy --tags mocks #1487
-
Hello people I am getting this error on running the script yarn hardhat deploy --tags mocks, I have installed hardhat-deploy. aviral@devMachine:~/devLearn/bcJS/hardhat/hhFundMe$ yarn hardhat deploy --tags mocks
yarn run v1.22.19
$ /home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/.bin/hardhat deploy --tags mocks
Nothing to compile
An unexpected error occurred:
Error: ERROR processing /home/aviral/devLearn/bcJS/hardhat/hhFundMe/deploy/00-deploy-mocks.js:
TypeError: deployScript.func is not a function
at DeploymentsManager.executeDeployScripts (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1219:41)
at DeploymentsManager.runDeploy (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1052:16)
at SimpleTaskDefinition.action (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/index.ts:438:5)
at Environment._runTaskDefinition (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at Environment.run (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
at SimpleTaskDefinition.action (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/index.ts:584:32)
at Environment._runTaskDefinition (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at Environment.run (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
at SimpleTaskDefinition.action (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/index.ts:669:5)
at Environment._runTaskDefinition (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at DeploymentsManager.executeDeployScripts (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1222:19)
at DeploymentsManager.runDeploy (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1052:16)
at SimpleTaskDefinition.action (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/index.ts:438:5)
at Environment._runTaskDefinition (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at Environment.run (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
at SimpleTaskDefinition.action (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/index.ts:584:32)
at Environment._runTaskDefinition (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
at Environment.run (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
at SimpleTaskDefinition.action (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat-deploy/src/index.ts:669:5)
at Environment._runTaskDefinition (/home/aviral/devLearn/bcJS/hardhat/hhFundMe/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 13 replies
-
Can you make a repo and link it here? I will look into it. |
Beta Was this translation helpful? Give feedback.
-
Could you please share your |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@aviral727 Could you please follow these guidelines next time when you ask a question? How to Ask Question Guide |
Beta Was this translation helpful? Give feedback.
-
I don't see any error other than the typo |
Beta Was this translation helpful? Give feedback.
-
I see my my mistake was the typo error at module.export but why is it that the main repo by Patrick sir has module.exports and it works? What is the difference? |
Beta Was this translation helpful? Give feedback.
I don't see any error other than the typo
module.export
instead ofmodule.exports
in your00-deploy-mocks.js