hotfix(ci): pin wrangler 4.81.1 to keep Node 20 compatibility - #170
Merged
Conversation
cloudflare/wrangler-action@v3 ignores the project's installed wrangler and runs its bundled 3.90.0, which predates .jsonc config support (added in 3.91). As a result both env.production and main fields in wrangler.jsonc go unread and the production deploy aborts with "No environment found" / "Missing entry-point". Pin wranglerVersion to 4.90.0 (matches yarn.lock) and set packageManager=yarn so the action installs through the same toolchain as the build:worker step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
문제 요약Cloudflare Workers 배포 워크플로우에 Wrangler CLI 버전 변경사항Wrangler 배포 구성
예상 코드 리뷰 소요 시간🎯 1 (Trivial) | ⏱️ ~3분 시 한 수
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
증상
main푸시 후 Cloudflare Workers 배포 실패. dev 푸시도 동일 증상 (PR #169 머지 시점부터).진짜 근본 원인
체인이 두 단계임:
1) Wrangler 4.86+ 가 Node 22 강제
PR #169 에서
wrangler ^4 → ^4.59.1로 하한 올리면서 yarn install 이 4.90.0 을 잠금. wrangler 는 4.86 부터 Node 22+ 강제하는데, CI 는 Node 20.2) wrangler-action@v3 의 fallback 오판
Node 버전 에러를 "wrangler 미설치"로 해석하여 번들된 3.90.0 을 강제 설치:
wrangler 3.90.0 은
.jsoncconfig 미지원 (지원은 3.91+). 결과적으로wrangler.jsonc의env.production/main필드를 못 읽어 두 에러 동시 발생.PR #167 머지는 왜 됐었나
5/5 시점 yarn.lock 의 wrangler 는 4.81.1 (당시
^4범위 안에서 최신). 4.81.1 은 Node 20 에서 정상 동작 → action 이 pre-installed 로 감지 → 성공.변경
package.json:wrangler ^4.59.1 → 4.81.1(정확 핀, 4.x 라인 중 Node 20 동작 가능한 마지막)yarn.lock: 4.90.0 → 4.81.1 재생성 (yarn up wrangler@4.81.1).github/workflows/deploy-cloudflare.yml:wranglerVersion: '4.81.1'+packageManager: yarn추가 (action 의 자동감지 우회, defense-in-depth)알려진 trade-off
@opennextjs/cloudflare ^1.19.8이 wrangler^4.86.0을 peer 로 요청 → yarn install 시 peer warning 발생 (에러 아님). 다음 cloudflare 어댑터 업그레이드 시 Node 22 로 같이 이전해야 함.Test plan
Deploy to Cloudflare Workersjob 에서wrangler 4.81.1으로 실행되는지 확인cchaksaWorker 정상 배포 + 운영 도메인 응답Follow-up (별도 이슈로)
.github/workflows/deploy-cloudflare.yml의node-version, 로컬.nvmrc, README)🤖 Generated with Claude Code