Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#967 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@alvarohare がすでに取り組んでいます。

2026年10月28日 から。

  • #976 @alvarohare による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript

調査の方向性

cdk/mise.toml と cdk/package.json を読み、次にタスク bootstrap:generate が2つのスクリプトをどのように呼び出すか、また workspace で tsx がどのように宣言されているかを確認してください。Issue では、ロックされた tsx の devDependency を追加し、knip の設定を更新することが提案されています。インストール済みの依存関係を使い、stdin を閉じた状態でタスクが実行され、バイト単位で同一の成果物が再生成されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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)
主要言語
TypeScript
スター
165
フォーク
50
平均マージ
6時間 18分
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws-samples/sample-autonomous-cloud-coding-agents のほかの issue

aws-samples/sample-autonomous-cloud-coding-agents の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。