PatrickAlphaC / hardhat-smartcontract-lottery-fcc

MIT License
117 stars 182 forks source link

Peer dependency issue with Hardhat and Chainlink/Contracts #129

Closed CarlosHernandez3 closed 1 year ago

CarlosHernandez3 commented 1 year ago

There seems to be a peer dependency issue between Hardhat-toolbox and @chainlink/contracts. My exact steps were

  1. npm init -y
  2. npm install --sav-dev hardhat
  3. npx hardhat
  4. select create javascript project
  5. npm install @chainlink/contracts

If I run hardhat compile i get the following error

Screen Shot 2023-01-04 at 11 54 51 AM

My hardhat.config has both

Screen Shot 2023-01-04 at 12 02 03 PM

My package.json devDependencies are as follows

Screen Shot 2023-01-04 at 1 29 20 PM

This is my folder structure

Screen Shot 2023-01-04 at 1 43 05 PM

My Raffle.sol has zero errors and neither does any the other files in the directory

If you need any other context or information please let me know I really want to progress through the course. I have tried searching for solutions on youtube and google to no avail.

rabobahago commented 1 year ago

Please go to hardhat-smartcontract-lottery-fcc patrick started boilerplate Dependencies in package.json, copy all package.json Dependencies paste them into your project package.json, delete your package.json.lock file and also delete node_modules folder, then run npm install again. It will fix any Dependencies problem.

PatrickAlphaC commented 1 year ago

Thanks @rabobahago !

Also,

Can you:

  1. Make this a discusson on the full repo? https://github.com/smartcontractkit/full-blockchain-solidity-course-js/
  2. Follow this section for formatting questions? https://www.youtube.com/watch?t=19846&v=gyMwXuJrbJQ&feature=youtu.be