Hono on Vercel example throws 502 when running `vercel dev`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
調査の方向性
まず package.json と src/index.ts から始め、hono-on-vercel の例を使って vercel dev で失敗を再現します。ローカルで使用されている TypeScript のバージョンとコンパイラオプションを、Vercel の開発ランタイムで使用されているものと比較します。例がローカルで起動し、http://localhost:3000 が 502 を返さなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Context
The hono-on-vercel works as expected when using the 1-click "Deploy" button on Vercel. But pull down the repository, make no changes, run vercel dev, and then go to http://localhost:3000 and it immediately throws 502 Bad Gateway.
Response
502: BAD_GATEWAY
Code: NO_RESPONSE_FROM_FUNCTION
Error output
> Ready! Available at http://localhost:3000
/Users/lance/Library/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
error TS5023: Unknown compiler option 'verbatimModuleSyntax'.
at createTSError (/Users/lance/Library/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/Users/lance/Library/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:863:19)
at createFromPreloadedConfig (/Users/lance/Library/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:874:36)
at create (/Users/lance/Library/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:624:10)
at Object.register (/Users/lance/Library/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:591:15)
at Object.<anonymous> (/Users/lance/Library/pnpm/global/5/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/register/index.js:1:16)
at Module._compile (node:internal/modules/cjs/loader:1706:14)
at Object..js (node:internal/modules/cjs/loader:1839:10)
at Module.load (node:internal/modules/cjs/loader:1441:32)
at Function._load (node:internal/modules/cjs/loader:1263:12) {
diagnosticCodes: [ 5023 ]
}
Error: Function `src/index.ts` failed with exit code 1
Steps to reproduce
- Go to https://vercel.com/templates/backend/hono-on-vercel
- Click the black Deploy button in the upper right corner of the page next to the View Demo button
- Connect via a Provider (I used GitHub)
- Give the repo a name, select a Team, and click the Create button
- Watch Vercel build and deploy the project
- Continue to Vercel Dashboard, find the Domain, and open the hono app to verify it works as expected ✅
- Click the Repository button in the upper right
- Clone the git repo to local machine and
cdinto the project - run
vercel dev - Set up and develop: Y
- Select Vercel scope
- Link to the project it finds: Y
- Server starts up:
Ready! Available at http://localhost:3000 - Navigate to http://localhost:3000
- A 502 Bad Gateway response is served and the error above is logged
Possible Diagnosis
Why does Vercel 48.1.6 (latest) install typescript 4.9.5 despite package.json specifies "typescript": "^5.8.3". The TypeScript flag verbatimModuleSyntax is only available in v5+.
% pnpm why --global typescript
Legend: production dependency, optional only, dev only
/Users/lance/Library/pnpm/global/5
dependencies:
vercel 48.1.6
├─┬ @vercel/express 0.0.22
│ └─┬ @vercel/node 5.3.24
│ ├─┬ ts-node 10.9.1
│ │ └── typescript 4.9.5 peer
│ └── typescript 4.9.5
├─┬ @vercel/h3 0.1.2
│ └─┬ @vercel/node 5.3.24
│ ├─┬ ts-node 10.9.1
│ │ └── typescript 4.9.5 peer
│ └── typescript 4.9.5
├─┬ @vercel/hono 0.1.2
│ └─┬ @vercel/node 5.3.24
│ ├─┬ ts-node 10.9.1
│ │ └── typescript 4.9.5 peer
│ └── typescript 4.9.5
└─┬ @vercel/node 5.3.24
├─┬ ts-node 10.9.1
│ └── typescript 4.9.5 peer
└── typescript 4.9.5
- 主要言語
- TypeScript
- スター
- 5.2k
- フォーク
- 1.9k
- 平均マージ
- 1時間 4分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel/examples のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
[next-chat] Typing indicator gets stuck when a socket disconnects mid-typing対応中かも @officialasishkumar が 12 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
CARGO-TAXIオープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
メンテナーはふだん 1 日以内に返信
-
Better Choicezオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
vercel/examples#1584 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
onbeat landing pageオープン
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
メンテナーはふだん 1 日以内に返信
vercel/examples の issue をすべて見る
似ている issue
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AOSSIE-Org/DebateAI#801 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Add: BOM Cineオープンapproved check:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信