Skip to content

Npm install breaks on fresh installs with EOVERRIDE: bignumber.js #5

Description

@web3buidlerz

Description

Fresh clones of this repo fail at npm install due to a conflicting bignumber.js declaration in package.json.

Steps to reproduce

  1. Clone the repository
  2. Run:
npm install

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions