-
|
hey can someone plz help me..im not able to deploy my 01-deploy-raffle.js An unexpected error occurred: Error: ERROR processing G:\smartcontract\hardhat-cc-me\deploy\01-deploy-raffle.js: package.json |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
@yingang2 : Your deploy script is perfectly fine :
After that run Let me know, If it resolves your issue! |
Beta Was this translation helpful? Give feedback.
-
|
@yingang2, it seems your issue is solved by another answer which is great, but it doesn't mentioned the cause of the error and proper way to solve the issue. so I write this answer.
This will fix your issue, and you can run
or Reference for the @nomiclabs/hardhat-ethers helpers. |
Beta Was this translation helpful? Give feedback.
@yingang2, it seems your issue is solved by another answer which is great, but it doesn't mentioned the cause of the error and proper way to solve the issue. so I write this answer.
You are getting this error because
ethers.getContract()does not exists in the@nomiclabs/hardhat-ethersplugin, for usingethers.getContract()you will needhardhat-deploy-ethersplugin which is a fork of@nomiclabs/hardhat-etherswith additional functionalities. Reference for hardhat-deploy-ethers pluginSince one of your other plugin might have hard-coded dependency on
@nomiclabs/hardhat-ethers, it will still use@nomiclabs/hardhat-etherseven if you installedhardhat-deploy-ethers. So you need to install