You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using @ledgerhq/hw-app-eth in my project, and I’ve noticed that in the latest version (6.40.2) of your @ledgerhq/hw-app-eth package ethers.js is listed as a devDependency in the package's package.json. However, ethers.js is also required for runtime usage in the package’s code (e.g., in lib-es/services/ledger/index.js), which makes it a necessary runtime dependency, not just for development.
The Problem: Since ethers.js is listed as a devDependency, it’s not installed when users of @ledgerhq/hw-app-eth add the package to their projects. This results in the package trying to use whatever version of ethers is present in the consuming project. In my case, I’m using ethers v6, but @ledgerhq/hw-app-eth expects ethers v5, which leads to compatibility issues and warnings like this:
WARNING in ./node_modules/@ledgerhq/hw-app-eth/lib-es/modules/Uniswap/decoders.js:15:23
export'utils' (imported as 'utils') was not found in'ethers'
WARNING in ./node_modules/@ledgerhq/hw-app-eth/lib-es/modules/Uniswap/index.js:84:35
export'utils' (imported as 'utils') was not found in'ethers'
WARNING in ./node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/index.js:136:29
export'utils' (imported as 'utils') was not found in'ethers'
Expected behavior
To resolve this, ethers.js should be moved from devDependencies to dependencies in package.json, so that it is correctly installed alongside @ledgerhq/hw-app-eth and the proper version (v5.x.x) is available for runtime use.
This change will ensure that @ledgerhq/hw-app-eth works as expected in projects that may already be using a different version of ethers.js, preventing the above errors and improving compatibility for all users.
Additional context
This is reproducible with @ledgerhq/hw-app-eth v6.40.x. I downgraded to v6.39.0 where the problem is not present yet.
The text was updated successfully, but these errors were encountered:
superKalo
changed the title
[Bug]: ethers.js Should Be Listed as a Dependency, Not a DevDependency
[Bug]: ethers.js Should Be Listed as a Dependency, Not a DevDependency (@ledgerhq/hw-app-eth)
Oct 23, 2024
Impacted Library name
@ledgerhq/hw-app-eth
Impacted Library version
6.40.2
Describe the bug
I'm using @ledgerhq/hw-app-eth in my project, and I’ve noticed that in the latest version (6.40.2) of your @ledgerhq/hw-app-eth package ethers.js is listed as a devDependency in the package's package.json. However, ethers.js is also required for runtime usage in the package’s code (e.g., in lib-es/services/ledger/index.js), which makes it a necessary runtime dependency, not just for development.
The Problem: Since ethers.js is listed as a devDependency, it’s not installed when users of @ledgerhq/hw-app-eth add the package to their projects. This results in the package trying to use whatever version of ethers is present in the consuming project. In my case, I’m using ethers v6, but @ledgerhq/hw-app-eth expects ethers v5, which leads to compatibility issues and warnings like this:
Expected behavior
To resolve this, ethers.js should be moved from devDependencies to dependencies in package.json, so that it is correctly installed alongside @ledgerhq/hw-app-eth and the proper version (v5.x.x) is available for runtime use.
This change will ensure that @ledgerhq/hw-app-eth works as expected in projects that may already be using a different version of ethers.js, preventing the above errors and improving compatibility for all users.
Additional context
This is reproducible with @ledgerhq/hw-app-eth v6.40.x. I downgraded to v6.39.0 where the problem is not present yet.
The text was updated successfully, but these errors were encountered: