Description
Fresh clones of this repo fail at npm install due to a conflicting bignumber.js declaration in package.json.
Steps to reproduce
- Clone the repository
- Run:
Expected behavior
npm install completes successfully and dependencies are installed.
Actual behavior
Install fails immediately with:
npm error code EOVERRIDE
npm error Override for bignumber.js@^10.0.2 conflicts with direct dependency
Environment
- OS: macOS (likely affects Linux/Windows as well)
- Node: v23.3.0 (not Node-specific)
- npm: 10.9.0
- Reproducible on a clean clone with no local config changes
Root cause
package.json declares bignumber.js as both a direct dependency and a top-level override, with incompatible version specs:
"dependencies": {
"bignumber.js": "^10.0.2"
},
"overrides": {
"bignumber.js": "10.0.2"
}
Per npm's overrides documentation, you cannot override a package that is also a direct dependency unless both use the exact same spec. Here, ^10.0.2 (range) and 10.0.2 (exact pin) do not match, so npm throws EOVERRIDE.
This is not related to user environment (SSH keys, network, etc.) and should affect most new users on modern npm (8.5+, 9, 10).
Suggested fix
Any one of these should resolve it:
Option A (simplest): Pin the direct dependency and use npm's reference syntax for the override:
"dependencies": {
"bignumber.js": "10.0.2"
},
"overrides": {
"bignumber.js": "$bignumber.js"
}
Option B: Remove the top-level override entirely if the direct dependency is sufficient:
"dependencies": {
"bignumber.js": "10.0.2"
}
Option C: If the override is only needed for transitive deps from @hiero-ledger/hiero-cli, scope it:
"overrides": {
"@hiero-ledger/hiero-cli": {
"bignumber.js": "10.0.2"
}
}
Note: src/shared/util/bignum.ts only uses import type from bignumber.js, so a runtime direct dependency may not even be required.
Impact
Blocks first-time setup for new contributors following the README:
npm install
npm run build
Description
Fresh clones of this repo fail at
npm installdue to a conflictingbignumber.jsdeclaration inpackage.json.Steps to reproduce
Expected behavior
npm installcompletes successfully and dependencies are installed.Actual behavior
Install fails immediately with:
Environment
Root cause
package.jsondeclaresbignumber.jsas both a direct dependency and a top-level override, with incompatible version specs:Per npm's
overridesdocumentation, you cannot override a package that is also a direct dependency unless both use the exact same spec. Here,^10.0.2(range) and10.0.2(exact pin) do not match, so npm throwsEOVERRIDE.This is not related to user environment (SSH keys, network, etc.) and should affect most new users on modern npm (8.5+, 9, 10).
Suggested fix
Any one of these should resolve it:
Option A (simplest): Pin the direct dependency and use npm's reference syntax for the override:
Option B: Remove the top-level override entirely if the direct dependency is sufficient:
Option C: If the override is only needed for transitive deps from
@hiero-ledger/hiero-cli, scope it:Note:
src/shared/util/bignum.tsonly usesimport typefrombignumber.js, so a runtime direct dependency may not even be required.Impact
Blocks first-time setup for new contributors following the README: