[BUG] 409 "Cannot publish over previously staged version" for a package that never used staged publishing

Aperta
#9,889 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
cli

Direzione di ricerca

Inizia riproducendo la pubblicazione fallita dall'esecuzione di GitHub Actions collegata e confronta lo stato del package nel registry con npm stage list e npm stage reject. Traccia la gestione da parte di npm CLI del conflitto di staged-version e determina perché un package assente sia dal packument sia dall'elenco delle staged versions viene rifiutato. Il lavoro è completato quando viene identificata una causa riproducibile e viene aggiunto un test di regressione per il percorso di pubblicazione interessato.

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

Descrizione

Bug Registry
Is there an existing issue for this?
  • I have searched the existing issues
This issue exists in the latest npm version
  • I am using the latest npm
This is not just a request to bump a dependency for a CVE
  • This is not solely a request to bump a dependency for a CVE
Current Behavior

@rspack/[email protected] cannot be published. Every attempt returns:

409 Conflict - PUT https://registry.npmjs.org/@rspack%2fbinding-linux-x64-musl
Cannot publish over previously staged version "2.2.0-beta.0".

We never used staged publishing — no npm stage publish, and it is not enabled for the package
or the @rspack org. Publishing is done from GitHub Actions via OIDC trusted publishing with
pnpm publish -r --tag beta --provenance (pnpm 11.8.0, Node 24.19.0).

The version does not exist as a published version (npm view → E404, absent from the packument
and from /-/npm/v1/attestations), and it does not appear as a staged version either —
npm stage list returns nothing, filtered by package or unfiltered, from a maintainer account.
So there is no stage-id to pass to npm stage reject, and no way for us to clear it.

The first publish that triggered this reported success and the process went on to publish the
next package normally; that one is live. Only this package ended up wedged.

Failing run: https://github.com/web-infra-dev/rspack/actions/runs/32102630939

Expected Behavior

No response

Steps To Reproduce
  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...
Environment
  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here
Lingua principale
JavaScript
Stelle
10.3k
Fork
5k
Merge medio
4g 11h
PR unite (30g)
26

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 npm/cli

Tutte le issue di npm/cli

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.