bug: agentcore package fails for TypeScript because esbuild is bundled
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- build-system, cli
調査の方向性
esbuild.config.mjs とパッケージマニフェストから始めて、CLI が esbuild をどのようにバンドルしてインストールするかを追跡します。npm-shrinkwrap.json の変更を確認し、ここで説明されている最小限の TypeScript fixture を既存のインストール済み tarball の smoke test に追加します。クリーンな npm-packed インストールで agentcore package が実行され、バンドルエラーなしに期待される ZIP が作成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
agentcore package fails when packaging a TypeScript CodeZip project because the CLI bundle includes esbuild's JavaScript API.
I encountered this with @aws/agentcore versions 0.27.1 and 0.28.0.
Steps to Reproduce
- Use an unmodified npm installation of
@aws/[email protected]. - Create a minimal project with the following files.
agentcore/agentcore.json:
{
"name": "PackageTest",
"version": 1,
"runtimes": [
{
"name": "TestRuntime",
"build": "CodeZip",
"entrypoint": "main.ts",
"codeLocation": "./app/TestRuntime",
"runtimeVersion": "NODE_22",
"protocol": "HTTP"
}
]
}
app/TestRuntime/main.ts:
export {};
app/TestRuntime/package.json:
{
"name": "typescript-package-fixture",
"version": "1.0.0",
"private": true
}
- From the project root, run:
agentcore package
Expected Behavior
The command successfully bundles the TypeScript entry point and creates agentcore/TestRuntime.zip.
Actual Behavior
Packaging fails with:
The esbuild JavaScript API cannot be bundled.
Please mark the "esbuild" package as external so it's not included in the bundle.
CLI Version
0.28.0
Operating System
macOS
Additional Context
The original environment used Node.js v24.15.0.
In esbuild.config.mjs, esbuild is not listed as an external dependency, so its JavaScript API is bundled into the CLI. TypeScript CodeZip packaging invokes that API at runtime.
Marking esbuild as external alone is insufficient: it is currently a development dependency, so an npm installation of the published CLI does not install it as a direct runtime dependency.
I have prepared a patch that:
- Marks
esbuildas external in the CLI build. - Moves
esbuildfromdevDependenciestodependencies, retaining the existing version range and updatingnpm-shrinkwrap.json. - Extends the existing installed-tarball smoke test to package a minimal TypeScript fixture and check that the ZIP is generated.
In a separate clean installation from an npm-packed tarball, the unpatched CLI failed with the error above, while the patched CLI successfully generated the ZIP.
This report concerns local packaging; no AWS deployment is required to reproduce it.
- 主要言語
- TypeScript
- スター
- 291
- フォーク
- 96
- 平均マージ
- 20時間 50分
- マージ済み PR(30日)
- 214
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/agentcore-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
aws/agentcore-cli#2395 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
aws/agentcore-cli#2392 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws/agentcore-cli#2267 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/agentcore-cli#2258 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/agentcore-cli#2176 ·
メンテナーはふだん 1 日以内に返信
aws/agentcore-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
diegosouzapw/OmniRoute#14869 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
メンテナーはふだん 1 日以内に返信
-
status: waiting triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
freeCodeCamp/freeCodeCamp#70412 ·
メンテナーはふだん 1 日以内に返信
-
Mend: dependency security vulnerability untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
opensearch-project/OpenSearch-Dashboards#12816 ·
メンテナーはふだん 1 日以内に返信