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
- 7 giờ 41 phút
- Pull request đã merge (30 ngày)
- 510
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
-
core: OpenRouter BYOK sessions record cost = 0 since v2.2.0 (ignores cost_details.upstream_inference_cost)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởreproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#60558 · 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#60541 · 2 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 67/100
anomalyco/opencode#60529 · 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 75/100
anomalyco/opencode#60469 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TUI permission prompt for MCP tools doesn't show the call argumentsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
anomalyco/opencode#60350 · 2 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ự
-
area:cli bug P4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug from-studio
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
esengine/DeepSeek-Reasonix#14868 ·
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 82/100
linxiv-dev/linXiv#384 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scope:core type:security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
follow-redirects updateĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
mailgun/mailgun.js#544 ·