Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

npm version lookups ignore the registry configured in .npmrc

Aperta
#7,634 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript
Ambito
backend

Direzione di ricerca

Start by locating NpmVersionResolver and YarnVersionResolver, which the issue identifies as fetching versions directly from the public registry; inspect their tests and the install-npm entry point to see how resolution is invoked. Compare those lookups with npm's configured registry and credential behavior. Done means private .npmrc registries and credentials are honored for latest and partial-version lookups, with regression tests covering those cases.

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

Descrizione

type:bug

Bug

The npm version resolver ignores the registry configured in .npmrc.

NpmVersionResolver and YarnVersionResolver look versions up directly at https://registry.npmjs.org/<package>; only containerbase's URL replacements are applied. The scope registries and credentials from .npmrc (eg. @corp:registry=https://npm.corp.example with an auth token) are never used. The install itself runs npm, which does use them.

So a package that only exists on a private registry can't be resolved:

  • install-npm @corp/tool (no version or latest) fails today, because the latest dist tag is fetched from the public registry.
  • install-npm @corp/tool 5 fails the same way once partial versions are resolved (#7633); before, 5 was passed through to npm unchanged.

A full version like install-npm @corp/tool 5.1.0 works, because it skips the lookup.

Expected

Version lookups use the same registry and credentials as the install, so latest and partial versions work for packages from any registry configured in .npmrc. One option is to ask npm itself, eg. npm view <package>@<range> version --json, since install-npm requires node anyway.

Context

Found by CodeRabbit on #7633 and deferred, since latest already has the problem.


Opened by Claude Opus 5.5 in Claude Code on behalf of @viceice.

Lingua principale
TypeScript
Stelle
58
Fork
65
Merge medio
10h 37m
PR unite (30g)
462

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 containerbase/base

Tutte le issue di containerbase/base

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.