Skip to content

Lesson 6: TypeError: Cannot read properties of undefined (reading 'contracts') #2882

Discussion options

You must be logged in to vote

@abdullahtanvir11 : Follow the steps, I'm listing below,

  • First Copy & Paste the dependencies I'm giving you below in your package.json file, And remove your's.
  • After that run the command : yarn hardhat clean
  • Then delete your node_modules folder.
  • After that in your terminal run the command : yarn To install the new dependencies.
  • After installing dependencies run : yarn hardhat compile

Then deploy your script : yarn hardhat run scripts/deploy.js --network goerli

{
  "dependencies": {
    "@nomiclabs/hardhat-ethers": "^2.0.4",
    "@nomiclabs/hardhat-etherscan": "^3.0.0",
    "@nomiclabs/hardhat-waffle": "^2.0.2",
    "chai": "^4.3.4",
    "ethereum-waffle": "^3.4.0",
    "ethers": "^5.5.3…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@abdullahtanvir11
Comment options

@othaime-en
Comment options

@abdullahtanvir11
Comment options

Comment options

You must be logged in to vote
2 replies
@abdullahtanvir11
Comment options

@RoboCrypter
Comment options

Answer selected by abdullahtanvir11
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants