PatrickAlphaC / hardhat-fund-me-fcc

82 stars 184 forks source link

I can't run yarn hardhat test - i am using git clone and still getting error #149

Closed LimbicAutomaton closed 1 year ago

LimbicAutomaton commented 1 year ago

I get the following error - it seems to be an issue with version control but i can't track it down. Any suggestions?


yarn run v1.22.19
warning package.json: No license field
$ /Users/bh/hh-fcc/hardhat-fund-me-fcc/node_modules/.bin/hardhat test
An unexpected error occurred:

TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
    at Object.<anonymous> (/Users/bh/hh-fcc/hardhat-fund-me-fcc/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:4:61)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Function.Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/bh/hh-fcc/hardhat-fund-me-fcc/node_modules/@nomiclabs/hardhat-ethers/src/internal/provider-proxy.ts:7:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.```
usaamatahir commented 1 year ago

Try install ethers specific version yarn add --dev ethers@v5 I think it will resolve the issue

LimbicAutomaton commented 1 year ago

this worked... thank you for putting an end to my headache!

usaamatahir commented 1 year ago

this worked... thank you for putting an end to my headache!

That's great. Please close the issue if its resolve