Skip to content

gemini-cli: npmDepsHash cache validation breaks with nixpkgs nodejs_24 upgrade #1644

@cameronraysmith

Description

@cameronraysmith

gemini-cli fails to build with recent nixpkgs-unstable (e.g. when consumers use inputs.nixpkgs.follows = "nixpkgs" ).

In NixOS/nixpkgs@f8062ac

nixpkgs updated default to nodejs 24 (npm 11), which changed cache validation semantics. npmDepsHash computed with npm 10 fails lookup with npm 11:

npm error code ENOTCACHED
npm error request to https://registry.npmjs.org/string-width failed: cache mode is 'only-if-cached' but no cached response is available.

Upstream issue:

Upstream fix for nixpkgs' gemini-cli: NixOS/nixpkgs@73771ab

Probably the fix here is to either pin nodejs = nodejs_22; in the buildNpmPackage attrs of packages/gemini-cli/package.nix or, alternatively, regenerate npmDepsHash with nodejs 24 if the npm 11 upgrade were somehow preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions