PatrickAlphaC / hardhat-simple-storage-fcc

74 stars 88 forks source link

Solution: Hardhat has been updated (and will not be similar to the video) #18

Closed deAgora closed 2 years ago

deAgora commented 2 years ago

For those of you (and me too) that have very little coding experience yet are following along with this great course I'd thought I'd share my pitfall and solution for the following issue:

If you are installing hardhat as per the instructions in the video you may find yourself installing a newer version of Hardhat that does not allow for the options that are shown in the video. If that should happen to you the following steps can get you back on track to following along with Patrick in the video.

1) If you have already installed a newer version of hardhat we need to remove that to install the version that Patrick is using (which is version 2.9.3). To do so, type 'yarn remove hardhat' in the terminal. This will remove the latest version (type 'yarn list' in the terminal to check and verify if step 1 worked).

2) Install the correct version of hardhat as used in the video. To do so type 'yarn add --dev hardhat@2.9.3' in the terminal which will install the older version which Patrick is using. After installation you will find that the options are available now.

These two steps have helped me to work around the issues of the newer version.

3) Another issue (that will also apply to later lessons) could be that while running hardhat (via the 'yarn hardhat' command in the terminal) you will not be prompted with a yes/no option to install all the required dependencies but you will be told to do so you yourself. This is really easy to fix as you can copy and paste the message into your terminal. For your convenience here is the command (the following list has more options as this post originally applied to lesson 10 in this coding course): yarn add --dev "hardhat@^2.9.3" "@nomiclabs/hardhat-waffle@^2.0.0" "ethereum-waffle@^3.0.0" "chai@^4.2.0" "@nomiclabs/hardhat-ethers@^2.0.0" "ethers@^5.0.0" "@nomiclabs/hardhat-etherscan@^3.0.0" "dotenv@^10.0.0" "eslint@^7.29.0" "eslint-config-prettier@^8.3.0" "eslint-config-standard@^16.0.3" "eslint-plugin-import@^2.23.4" "eslint-plugin-node@^11.1.0" "eslint-plugin-prettier@^3.4.0" "eslint-plugin-promise@^5.1.0" "hardhat-gas-reporter@^1.0.4" "prettier@^2.3.2" "prettier-plugin-solidity@^1.0.0-beta.13" "solhint@^3.3.6" "solidity-coverage@^0.7.16"

If any experts can chime in on any other tips/tricks to help us newbies that would be more than welcome.

From one Patrick (the newbie) to another Patrick (the pro); thanks for sharing your knowledge with us > this may change a lot of lives for the better tips hat to you.

*This is a repost from the original one that applies to Lesson 10.

amo345 commented 2 years ago

Thankyou for the help

deAgora commented 2 years ago

I have only watched Lesson 8 section and did not code along. I am not looking for the HTML approach > I prefer the NextJS route. Did you have any issues with it? I am more than happy to try and help out if need be.

Viku2612 commented 2 years ago

thanks for the help mate..