Reopened: ethersproject 5.5.0 BaseProvider ovewrite Provider failed
See original GitHub issuePrevious issue: https://github.com/ethers-io/ethers.js/issues/2190
Issue above got closed while adding my comment lol.
Here is a copy of that comment, the issue seems to still exist:
It seems ethers@5.5.1 mostly pulls in @ethersproject dependencies at version 5.5.0:
{
"author": "Richard Moore <me@ricmoo.com>",
"browser-old": "./dist/ethers.umd.js",
"dependencies": {
"@ethersproject/abi": "5.5.0",
"@ethersproject/abstract-provider": "5.5.1",
"@ethersproject/abstract-signer": "5.5.0",
"@ethersproject/address": "5.5.0",
"@ethersproject/base64": "5.5.0",
"@ethersproject/basex": "5.5.0",
"@ethersproject/bignumber": "5.5.0",
"@ethersproject/bytes": "5.5.0",
"@ethersproject/constants": "5.5.0",
"@ethersproject/contracts": "5.5.0",
"@ethersproject/hash": "5.5.0",
"@ethersproject/hdnode": "5.5.0",
"@ethersproject/json-wallets": "5.5.0",
"@ethersproject/keccak256": "5.5.0",
"@ethersproject/logger": "5.5.0",
"@ethersproject/networks": "5.5.0",
"@ethersproject/pbkdf2": "5.5.0",
"@ethersproject/properties": "5.5.0",
"@ethersproject/providers": "5.5.0", // <--- π
"@ethersproject/random": "5.5.0",
...
},
...
"version": "5.5.1"
}
Is this normal?
Anyway pulling in @ethersproject/providers@5.5.0 seems to suffer from the original issue:
Check file:///home/voltrevo/workspaces/ethf/bls-wallet/aggregator/deps.ts
error: TS2416 [ERROR]: Property 'resolveName' in type 'BaseProvider' is not assignable to the same property in base type 'Provider'.
Type '(name: string | Promise<string>) => Promise<string | null>' is not assignable to type '(name: string | Promise<string>) => Promise<string>'.
Type 'Promise<string | null>' is not assignable to type 'Promise<string>'.
Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
resolveName(name: string | Promise<string>): Promise<null | string>;
~~~~~~~~~~~
at https://cdn.esm.sh/v54/@ethersproject/providers@5.5.0/lib/base-provider.d.ts:132:5
(Seeing this in deno trying to import https://esm.sh/ethers@5.5.1
.)
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
ethersproject 5.5.0 BaseProvider ovewrite Provider failed #2190
BaseProvider => resolveName(name: string | Promise): Promise ; Provider => resolveName(name: string | Promise): Promise;
Read more >@ethersproject/providers - npm
Start using @ethersproject/providers in your project by running `npm i ... other projects in the npm registry using @ethersproject/providers.
Read more >unpredictable_gas_limit | The AI Search Engine You Control
Hi Pedro, when it comes to run the application and the profitable value is true I get the ERROR: reason: 'cannot estimate gas;...
Read more >@ethersproject/constants - npm package | Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >@ethersproject/providers | Yarn - Package Manager
@ethersproject/providers ... 0 vulnerabilities. Ethereum Providers for ethers. Ethereum, ethers ... (1392803); Added new error strings Pocket returns.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not sure if it can help but Iβm also facing issues since the last upgrade:
I think the problem would be resolved if all the subpackages, such as
@ethersproject/abstract-provider
would use~
instead of^
for the@ethersproject/*
dependencies.Right now you will almost always have 2 versions of
@ethersproject/abstract-provider
, which causes all these issues (I have been battling them for months now, the only solution is to useresolution
field in the parent package). If I write my code for a fixed versionethers~5.4.0
(pulling in@ethersproject/abstract-provider@5.4.0
and as soon as the new version 5.5.0 is released for the package (@ethersproject/abstract-provider@5.5.0
) my code will break if there was a change to theProvider
class that I am inheriting from5.4.0
. Example:ethers
dependencies:@ethersproject/abstract-signer
dependencies:You cannot select a fixed version without the
resolutions
field.