Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

cdk(bootstrap): bootstrap:generate fetches an unpinned tsx via npx and prompts in non-interactive runs

Đang mở Phù hợp với người mới
#967 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@alvarohare đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #976 của @alvarohare — đang mở

Đá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
78/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ệ
node.js, typescript
Lĩnh vực
build-system, devops

Hướng nghiên cứu

Đọc cdk/mise.toml và cdk/package.json, sau đó kiểm tra tác vụ bootstrap:generate gọi hai script như thế nào và tsx được khai báo trong workspace ra sao. Issue đề xuất thêm một devDependency tsx được khóa phiên bản và cập nhật cấu hình knip. Hoàn tất khi tác vụ chạy với stdin đã đóng, sử dụng dependency đã cài đặt và tạo lại các artifact giống hệt từng byte.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Component: CDK / infrastructure (bootstrap tasks)

Describe the bug

mise //cdk:bootstrap depends on //cdk:bootstrap:generate, which runs npx tsx scripts/generate-bootstrap-artifacts.ts && npx tsx scripts/generate-bootstrap-template.ts. tsx is not declared in any package.json, so every bootstrap makes npx download the newest published tsx at run time. The comment above [tasks."preflight:log-delivery"] in cdk/mise.toml already calls this out as unacceptable on the deploy path, but bootstrap:generate still does it.

Two consequences:

  1. Unpinned download on the bootstrap path. The version of a tool that generates the IAM policy artifacts is whatever npm serves that day, not what yarn.lock pins. It also fails outright with no network.
  2. Hangs/aborts in non-interactive runs. npx asks Need to install the following packages: [email protected] Ok to proceed? (y). With stdin not attached (CI, wrappers, scripts that capture output), the prompt either aborts the task or waits.

Expected behavior

mise //cdk:bootstrap runs only locked dependencies installed by yarn install and never prompts.

Current behavior

[//cdk:bootstrap:generate] $ npx tsx scripts/generate-bootstrap-artifacts.ts && npx tsx scripts/generate-bootstrap-template.ts
Need to install the following packages:
[email protected]
Ok to proceed? (y)

Reproduction steps

  1. Fresh clone, mise run install (or yarn install).
  2. Confirm node_modules/.bin/tsx does not exist.
  3. MISE_EXPERIMENTAL=1 mise //cdk:bootstrap:generate </dev/null → prompt / abort.

Possible solution

Declare tsx as a devDependency of cdk/package.json (and add it to knip's ignoreDependencies for the cdk workspace, since it is only used from mise.toml). npx tsx then resolves the locked local binary. Switching to node --experimental-strip-types (as the preflight did) is not a drop-in: these scripts import src/bootstrap/policies as a directory, which Node's ESM loader rejects (ERR_UNSUPPORTED_DIR_IMPORT). Verified locally: with tsx declared, bootstrap:generate runs with stdin closed and regenerates byte-identical artifacts. Happy to open the PR.

Environment

  • Node 22.14.0 (mise) · mise 2026.10.18 macos-arm64 · Yarn 1.22.22
  • Commit 6dad935f (main)
Ngôn ngữ chính
TypeScript
Star
165
Fork
50
Merge trung bình
6 giờ 18 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws-samples/sample-autonomous-cloud-coding-agents

Tất cả issue của aws-samples/sample-autonomous-cloud-coding-agents

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.