Skip to content

Published JS client sets engines.node >=24, breaking Yarn Classic installs on Node 22 #176

Description

@beeman

Since v0.14.0 the published @solana-program/token manifest carries "engines": { "node": ">=24.0.0" }. The field was added in #160, which migrated the repo's lint and format tooling to Oxlint and Oxfmt — per the PR description the floor exists because the Oxc TypeScript configs require Node 24. That is a constraint on the repo's dev tooling, but engines in the published manifest constrains consumers instead, and the client's runtime gained no Node 24 requirement in that PR.

The fallout is package-manager dependent: npm, pnpm, and bun warn, while Yarn Classic fails the install hard:

error @solana-program/token@0.16.0: The engine "node" is incompatible with this module. Expected version ">=24.0.0". Got "22.23.2"
error Found incompatible module.

We hit this in solana-mobile/templates CI (https://github.com/solana-mobile/templates/actions/runs/33258134422/job/99115310789), where an app depending on @solana-program/token installs fine with npm, pnpm, and bun on Node 22 and fails only with yarn. Downgrading to 0.13.0, the last release without engines, is not a way out because it peers on @solana/kit@^6.5.0.

Suggestion: drop engines from the published clients/js/package.json and keep the Node 24 floor for contributors another way, for example the devEngines field, which modern npm and pnpm enforce for the repo itself without gating consumers. For reference, @solana-program/system and @solana-program/memo publish no engines field, so token is currently the odd one out in the org.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions