install/upgrade: tarball URL for @opencode scoped packages is missing the package-name segment — curl installs/upgrades 404
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bash, node.js, typescript
Direzione di ricerca
Inizia con l’installer curl v2 e con l’installer integrato in opencode upgrade --method curl; segui come package_scope, package_name e filename formano l’URL del tarball npm. Confronta l’URL 200 funzionante dell’issue con l’URL 404 che non funziona, quindi verifica che l’installer usi il nome completo del pacchetto nel percorso e possa scaricare il tarball della piattaforma richiesta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The v2 curl installer (and the installer embedded in opencode upgrade --method curl) constructs the npm registry tarball URL from the bare package scope, dropping the package-name path segment. Every curl-method install or upgrade of @opencode/cli-<target> since the scope migration to @opencode 404s before the binary is ever downloaded.
Environment
- opencode version: 2.0.30 (bundled installer), upgrading to 2.2.1 via
opencode upgrade 2.2.1 --method curl - OS: Windows 11 Home x64 (build 10.0.26300); opencode running in WSL2 Ubuntu (bash)
- Terminal: Windows Terminal / bash in WSL
- Shell: /bin/bash
- Install/channel: latest, v2 curl installer
Reproduction
- Run
opencode upgrade 2.2.1 --method curl
(equivalently:curl -fsSL https://opencode.ai/v2/install | bash -s -- --version 2.2.1) - The installer resolves version 2.2.1 from the update endpoint (
package: "@opencode/cli",package_scope: "@opencode") - It builds the tarball URL as
https://registry.npmjs.org/@opencode/-/cli-linux-x64-2.2.1.tgzand fetches it - curl exits 22:
The requested URL returned error: 404
Root cause
For npm scoped packages the registry tarball path must include the full package name:
https://registry.npmjs.org/@opencode/cli-linux-x64/-/cli-linux-x64-2.2.1.tgz → 200
but the script assembles the URL from the bare scope:
https://registry.npmjs.org/@opencode/-/cli-linux-x64-2.2.1.tgz → 404
($package_scope is @opencode after ${package%/cli}, and $filename is only cli-<target>-<version>.tgz — the cli-linux-x64 segment between scope and /-/ is lost.)
Expected Behavior
The installer downloads the platform tarball from the correct registry path and installs the requested version.
Actual Behavior
curl fails with HTTP 404; opencode upgrade reports Upgrade failed — The OpenCode installer failed — curl: (22) The requested URL returned error: 404. No version can be installed through the curl method.
Additional Context
- Confirmed the published tarball exists and is fetchable:
https://registry.npmjs.org/@opencode/cli-linux-x64/-/cli-linux-x64-2.2.1.tgz→ 200 - Affects every curl-method install/upgrade of any
@opencode/cli-<target>package since the scope migration (2.2.0+), both with and without an explicit--version - Workaround: download the correct tarball manually and place
package/bin/opencodeinto~/.opencode/bin/opencode - Related: #55907 / #55918 (the mirrored-networking port issue I hit right after upgrading), #57413 (same symptom — missing artifact — different cause)
- Suggested fix: derive the tarball URL from
package_name($package_scope/cli-$target) instead of$package_scope, i.e.https://registry.npmjs.org/$package_name/-/$filename
- Lingua principale
- TypeScript
- Stelle
- 221k
- Fork
- 29.6k
- Merge medio
- 5h 32m
- PR unite (30g)
- 492
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di anomalyco/opencode
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
anomalyco/opencode#60143 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#60121 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
anomalyco/opencode#59973 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
triaging
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#59942 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
anomalyco/opencode#59886 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di anomalyco/opencode
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
marmelab/react-admin#11431 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
db-ux-design-system/core-web#8655 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
epam/statgpt-admin-frontend#305 ·
I maintainer di solito rispondono entro 1 giorno