install/upgrade: tarball URL for @opencode scoped packages is missing the package-name segment — curl installs/upgrades 404
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bash, node.js, typescript
Hướng nghiên cứu
Bắt đầu với trình cài đặt curl v2 và trình cài đặt được nhúng trong opencode upgrade --method curl; theo dõi cách package_scope, package_name và filename tạo thành URL của gói tarball npm. Đối chiếu URL 200 hoạt động trong issue với URL 404 bị lỗi, sau đó xác minh trình cài đặt sử dụng tên gói đầy đủ trong đường dẫn và có thể tải xuống gói tarball cho nền tảng được yêu cầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 221k
- Fork
- 29.6k
- Merge trung bình
- 5 giờ 32 phút
- Pull request đã merge (30 ngày)
- 492
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anomalyco/opencode#60143 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#60121 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#59973 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#59942 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
anomalyco/opencode#59886 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
lichess-org/lila#22324 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsĐang mởep:WebGPU platform:web quantization
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/onnxruntime#33752 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Skill Bug]: entra-agent-id: inaccurate blueprint permission inheritance and parent token sub claimĐang mởbug entra-agent-id
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/GitHub-Copilot-for-Azure#3467 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(worker): keep normal prepare waiting states failure-freeCó thể đã có người làm @LichKing-2234 đã nhận hôm nay. Đang mởagent:codex priority:P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AgoraIO-Extensions/agent-infra#3745 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framingCó thể đã có người làm @Eapp1e đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
makecindy/cindy#7973 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày