Skip to content

hotfix(ci): pin wrangler 4.81.1 to keep Node 20 compatibility - #170

Merged
Doubtagain merged 1 commit into
mainfrom
hotfix/ci-wrangler-version-pin
May 12, 2026
Merged

hotfix(ci): pin wrangler 4.81.1 to keep Node 20 compatibility#170
Doubtagain merged 1 commit into
mainfrom
hotfix/ci-wrangler-version-pin

Conversation

@Doubtagain

@Doubtagain Doubtagain commented May 12, 2026

Copy link
Copy Markdown
Collaborator

증상

main 푸시 후 Cloudflare Workers 배포 실패. dev 푸시도 동일 증상 (PR #169 머지 시점부터).

⛅️ wrangler 3.90.0 (update available 4.90.1)
▲ [WARNING] No environment found in configuration with name "production".
✘ [ERROR] Missing entry-point: ... or the `main` config field.

진짜 근본 원인

체인이 두 단계임:

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.

[command] yarn wrangler --version
→ "Wrangler requires at least Node.js v22.0.0. You are using v20.20.2."

2) wrangler-action@v3 의 fallback 오판

Node 버전 에러를 "wrangler 미설치"로 해석하여 번들된 3.90.0 을 강제 설치:

⚠️ Wrangler not found or version is incompatible. Installing...
[command] yarn add wrangler@3.90.0

wrangler 3.90.0 은 .jsonc config 미지원 (지원은 3.91+). 결과적으로 wrangler.jsoncenv.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 Workers job 에서 wrangler 4.81.1 으로 실행되는지 확인
  • cchaksa Worker 정상 배포 + 운영 도메인 응답

Follow-up (별도 이슈로)

  • Node 20 → 22 마이그레이션 (.github/workflows/deploy-cloudflare.ymlnode-version, 로컬 .nvmrc, README)
  • 그 후 wrangler / @opennextjs/cloudflare 최신화 재시도

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented May 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chukchuk-haksa Building Building Preview, Comment May 12, 2026 3:22pm

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1b18b966-9046-42b3-896f-99440f0cf717

📥 Commits

Reviewing files that changed from the base of the PR and between 7ed96a7 and 247bc53.

📒 Files selected for processing (1)
  • .github/workflows/deploy-cloudflare.yml

문제 요약

Cloudflare Workers 배포 워크플로우에 Wrangler CLI 버전 4.90.0 고정과 yarn 패키지 매니저 설정이 추가되었습니다.

변경사항

Wrangler 배포 구성

Layer / File(s) 요약
Wrangler 버전 및 패키지 매니저 고정
.github/workflows/deploy-cloudflare.yml
wrangler-action 입력에 wranglerVersion: '4.90.0'packageManager: yarn이 추가되어 배포 단계의 도구 버전과 패키지 관리자를 명시적으로 지정합니다.

예상 코드 리뷰 소요 시간

🎯 1 (Trivial) | ⏱️ ~3분

시 한 수

🐰 버전을 꼭 고정하고,
냥냥이 yarn으로 가니,
배포 안정성은 쑥쑥!
작은 변화가 큰 힘을 내네,
워크플로우 다져지는 기분 좋아요! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/ci-wrangler-version-pin

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Doubtagain
Doubtagain merged commit 972c0ee into main May 12, 2026
1 of 4 checks passed
@Doubtagain Doubtagain changed the title hotfix(ci): pin wrangler 4.90.0 in deploy action hotfix(ci): pin wrangler 4.81.1 to keep Node 20 compatibility May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant