Global install on Node.js 24 warns about deprecated @github/keytar and unapproved install scripts
What happened?
Running npm install -g @google/gemini-cli with Node.js 24 completes but produces a deprecation warning for @github/[email protected] and install-script approval warnings for @github/keytar and node-pty:
$ npm install -g @google/gemini-cli
npm warn deprecated @github/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
added 7 packages in 3s
npm warn install-scripts 2 packages have install scripts not yet covered by allowScripts:
npm warn install-scripts @github/[email protected] (install: node script/install.js || npm run build)
npm warn install-scripts [email protected] (install: node-gyp rebuild; postinstall: node scripts/post-install.js)
npm warn install-scripts
npm warn install-scripts Run `npm install -g --allow-scripts=@github/keytar,node-pty` to allow these scripts once, or `npm config set allow-scripts=@github/keytar,node-pty --location=user` to allow them for all global installs.
The output reports a completed installation, not a fatal installation error. Whether the CLI starts successfully afterward has not yet been verified.
What did you expect to happen?
Gemini CLI installs without deprecated dependency warnings, with clear guidance on any required native dependency install-script approvals for the npm version in use.
Client information
- Node.js: 24 (exact patch version not recorded)
- npm: current installed version (exact version not yet recorded)
- Operating system: not yet recorded
- Gemini CLI version and
/aboutoutput: not yet recorded
Login information
Not applicable to the installation step.
Anything else we need to know?
Related: #21537, which was closed as completed and concerned deprecated prebuild-install through the older keytar dependency. That issue proposed switching to @github/keytar; the installation output above now reports @github/[email protected] itself as deprecated.
A search of open and closed issues did not find an exact match for the allowScripts / --allow-scripts warnings. The suggested script-approval commands have not yet been tested for this report.
There is a problem with the Gemini CLI issue triaging. Please check the action logs for details.
Hi @vjanelle, I’d like to investigate this issue.
I can reproduce the global installation behavior and investigate both the deprecated @github/keytar dependency and the allowScripts warnings for Node.js 24/npm. I’ll first verify the behavior across the relevant Node.js/npm versions and determine whether the appropriate fix is a dependency update, package configuration change, or improved installation guidance.
If there are no objections, I’d be happy to work on this issue.
I reproduced the same warning on Linux x64 with Node 26.13.1, npm 12.2.3, and Gemini CLI 0.71.1. Both Gemini CLI 0.59.0 and 0.71.1 declare @github/keytar: 7.10.6 and node-pty: 1.0.0 as optional dependencies.
npm install --global --allow-scripts=@github/[email protected],[email protected] @google/[email protected]
gemini --version
The install completes and gemini --version prints 0.71.1. The native keytar and PTY modules load after the approved install. npm still warns that @github/[email protected] is deprecated. Our CI keeps the exact script approval so it can exercise the installed client under npm 12 without changing credential storage behavior.
A possible replacement for the credential-store binding is @napi-rs/keyring 2.1.2. Please preserve existing service and account names, qualify lookup and deletion on each supported credential store, and provide migration or legacy read fallback if any backend uses a different identifier. A packaged import check on the supported Node 24 and 26 lines would also cover the install-script transition.
The npm command and isolation workaround also apply to this report. Gemini CLI 0.71.1 with npm 12.2.3 starts in headless mode without optional dependencies when installed into a local prefix. npm still installs keytar with a global prefix and --omit=optional.
This also reproduces with a registry package name, without a tarball URL, on npm 12.2.3 and Gemini CLI 0.71.1.
work=$(mktemp -d)
npm install --global --prefix "$work/global" --ignore-scripts --omit=optional @google/[email protected]
find "$work/global" -type d -name keytar
npm install --prefix "$work/local" --ignore-scripts --omit=optional @google/[email protected]
find "$work/local" -type d -name keytar
"$work/local/node_modules/.bin/gemini" --version
The first command reports seven installed packages and warns about the deprecated optional @github/[email protected]. The first find locates it below the installed Gemini package. The local-prefix command reports one installed package and no keytar; the CLI prints 0.71.1. This is also visible in Router's hosted run.
The isolated local prefix and its node_modules/.bin directory work around the issue for headless, API-key-only CI. Please exercise omitted optional dependencies in the global Arborist reification path for both registry specs and tarball specs. A regression can use a fixture package that declares an optional installable package and assert that neither spec produces the optional package on disk.
For Gemini, replacing the deprecated package or moving the native keyring feature behind an explicit opt-in would fix the install warning for full global installs. The npm reproduction is recorded at https://github.com/npm/cli/issues/8284#issuecomment-7261652208.