npm ci fails with EALLOWREMOTE on npm 12

Aperta Adatta ai principianti
#30,525 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@landry-kapgnep ci sta già lavorando.

Dal 29/11/2026.

  • #30526 di @landry-kapgnep — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js
Ambito
cli, tooling

Direzione di ricerca

Inizia da .npmrc, dove sono configurati l'ambito dei pacchetti @google e la policy dei pacchetti remoti di npm, ed esamina la risoluzione del lockfile menzionata nel issue. Riproduci con Node 24.16.0 e npm 12.0.2 eseguendo npm ci, quindi verifica la modifica della configurazione con npm ci, npm run build e npm start. Il lavoro è completato quando l'installazione riesce senza dover passare manualmente --allow-remote=all e la build e l'avvio della CLI riescono.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

status/need-triage
What happened?

npm ci fails with npm 12.0.2 on a fresh clone :

npm error code EALLOWREMOTE
npm error Fetching packages of type "remote" have been disabled
npm error Refusing to fetch "@google/genai@https://registry.npmjs.org/@google/genai/-/genai-1.30.0.tgz"

Because of that, npm run build and npm start also fail (cannot find read-package-up / cross-env).

To reproduce :
1- Fresh clone
2- Node 24.16.0 + npm 12.0.2
3- npm ci

Cause : npm 12 sets allow-remote to none by default, so it refuses tarballs from any host that is not the configured registry. .npmrc points the @google scope to Wombat but the lockfile resolves @google/* from registry.npmjs.org, so npm 12 sees them as remote and blocks them.

What did you expect to happen?

npm ci works on npm 12 like it does on npm 10 and 11.

Same machine :

  • npm 10.x : ok
  • npm 11.13.0 : ok
  • npm 12.0.2 : EALLOWREMOTE
  • npm 12.0.2 with --allow-remote=all : ok, and build, npm start and the shell tool all work
Client information
Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
CLI Version   0.73.0-nightly.20261123.gaafdfdfb5
Git Commit    090c48ff9
Model         Auto
Sandbox       no sandbox
OS            win32
Auth Method   gemini-api-key

Platform : Windows 11
Node : 24.16.0
npm : 12.0.2 (fails), 11.13.0 and 10.x (work)
Commit : 60f8082b1

Login information

API key which doesn't matter here as it fails at install time

Anything else we need to know?

The CONTRIBUTING.md file asks for Node ~20.19.0, which ships npm 10, so the documented setup is not affected. This hits anyone who upgraded npm globally (npm i -g npm@latest) which is how I ran into it. This will very likely hit more contributors as npm 12 spreads.

npm 12 also blocks install scripts for dependencies that are not listed in allowScripts (10 packages here, including node-pty and tree-sitter-bash). The CLI still runs for me, so I left that out of the fix but you may want an explicit allowScripts list at some point.

Related: #16901, #30285

I would like to fix this. My plan is to add allow-remote=all to .npmrc. If you'd rather keep Wombat out of the install path entirely and only use it when publishing, I can also do that instead.

Lingua principale
TypeScript
Stelle
109k
Fork
15k
Merge medio
1g 24m
PR unite (30g)
91

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google-gemini/gemini-cli

Tutte le issue di google-gemini/gemini-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.