Skip to content

[Defect] Dependencies are pinned to exact versions, causing conflicts with EVM integrations #1340

@Tarnadas

Description

@Tarnadas

Description
All of the near/wallet-selector packages currently pin their dependencies to exact versions in package.json (e.g. "@wagmi/core": "2.16.7" instead of "^2.16.7"). This prevents semver resolution, leads to duplicate installs in projects that also pull in wagmi, and breaks builds when using EVM tooling.


Reproduction steps

  1. Open any package’s package.json and observe that every dependency is specified without a caret (^).
  2. In a separate project that already depends on @wagmi/core, install @near-wallet-selector/ethereum-wallets.
  3. Run npm install (or pnpm install/yarn install).
  4. Notice two versions of @wagmi/core in node_modules and build/runtime errors due to mismatched instances.
  5. Manually change all versions to caret ranges (e.g. "^2.16.7"), rebuild, publish locally, and verify it works.
  6. Run the NX build/publish process: observe that NX strips the caret prefixes again in the built package.json.

Expected behavior

  • Node.js packages should use ^ semantics by default, allowing patch/minor updates and deduplication.
  • A single copy of @wagmi/core (or any shared dependency) should be resolved, avoiding conflicts.
  • NX tooling should preserve semver prefixes when updating version numbers and during build/publish. If NX does not support this, consider migrating to an alternative (e.g., plain npm scripts, Yarn Workspaces, or pnpm) that does.

Actual behavior

  • Dependencies remain pinned exactly, causing multiple copies of the same library.
  • Builds fail or UI breaks when mixing EVM-related packages with NEAR wallet-selector.
  • Even after manually switching to caret ranges, NX’s build/publish pipeline removes the ^ prefixes again.

Suggested solution

  1. Switch all dependencies in package.json to use caret ranges (e.g. "^2.16.7").
  2. Configure NX (or the workspace generator) to preserve semver prefixes when updating version numbers and during build/publish. If NX doesn’t support it, migrate to a toolchain that does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Emerging TechEmerging Tech flying formation at PagodabugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions