question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Couldn't find ethers-v5

See original GitHub issue

I am getting this error after trying to generate typechain files out of my artifacts:

Error: Couldn't find ethers-v5. Tried loading: @typechain/ethers-v5, typechain-target-ethers-v5, C:\Users\oxman\Code\defi\keep3r\keep3r-v2\ethers-v5.
Perhaps you forgot to install @typechain/ethers-v5?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
krzkaczorcommented, Jul 31, 2021

Adding "*": ["node_modules/*"] to tsconfig.json fixes it.

https://github.com/dividab/tsconfig-paths/issues/88

I am leaning towards changing the default output directory to typechain-types to avoid this issue in the future.

2reactions
aspierscommented, Feb 15, 2022

@krzkaczor Are you sure this is resolved? I am still seeing the same issue. After much trial and error, the only thing which fixed it for me was:

"nohoist": [
  "**/typechain",
  "**/@typechain/*"
]

I found it was essential to stop @typechain/hardhat getting hoisted.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Couldn't find ethers-v5 · Issue #423 - GitHub
I am getting this error after trying to generate typechain files out of my artifacts: Error: Couldn't find ethers-v5.
Read more >
@typechain/ethers-v5 - npm
@typechain/ethers-v5. TypeScript icon, indicating that this package has built-in type declarations. 10.2.0 • Public • Published 13 days ago.
Read more >
Perhaps you forgot to install @typechain/ethers-v5? - Zenn
An unexpected error occurred : Error: Couldn't find ethers-v5. Tried loading: @typechain/ethers-v5, typechain-target-ethers-v5, ...
Read more >
typechain --target ethers-v5 is not recognized as an internal ...
json'",. When I try to run this I always have this error (I'm on windows) any idea ? typechain --target ethers ...
Read more >
Error: cannot estimate gas; transaction may fail or may require ...
Hardhat deploy contract error: Error: cannot estimate gas; ... gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found