Replies: 2 comments
-
It's not usually a good a idea to type check dependencies within the A lot of this goes away in v6, which I'm working on now and hoping in another couple weeks to get a beta version out for. In v6, everything is targeted for ESM, uses strict typing and all dependencies are TypeScript, so there are none of these weird commonjs bridging issues. So this will not be changed in v5 as I'm trying to focus my time on getting v6 out. For now the best solution is to not type check dependencies. Hope that makes sense. :) |
Beta Was this translation helpful? Give feedback.
-
(oh, thanks for your comments btw, glad you like it ;) I'll move this to discussions, in case others have more to say too) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I'm using
ethers@^5.5.1
in my next-js web application.As part of the production build process, the compiler is running typescript checks on all node_modules libraries that were imported into the project.
I'm getting this error in
bignumber.ts
file:As the error message suggested, I went ahead and installed
@types/bn.js@5.1.0
npm package.This solved the first TS error, but introduced a couple of more:
I jumped into the file and saw this warning, as well as some other ones that might be worth looking at.
I added screenshots from my IDE with the description and line number:
When I set the compiler to skip all typescript checks, the application works as expected.
I hope it's the right place for me to post this issue, it's not a bug, but it blocks the deployment process for typescript developers who uses nextjs / webpack 5.
It's also worth mentioning that the same errors were in 'ethers@^5.4.6'.
Prior to creating this issue, I used the search terms: "typescript", "bignumber" "bn.js" "nextjs".
Thanks for you guys's help!
I love using ethers, it's way better than web3.js ;)
Beta Was this translation helpful? Give feedback.
All reactions