Skip to content

fix: hooks 함수가 배포되지 않던 tsconfig noEmit 수정 및 배포 워크플로우 정리 - #622

Merged
iOdiO89 merged 15 commits into
devfrom
chore/618-hooks-vercel-config
Sep 4, 2026
Merged

fix: hooks 함수가 배포되지 않던 tsconfig noEmit 수정 및 배포 워크플로우 정리#622
iOdiO89 merged 15 commits into
devfrom
chore/618-hooks-vercel-config

Conversation

@iOdiO89

@iOdiO89 iOdiO89 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

작업 요약

  • apps/hooks Vercel 배포가 빌드 단계에서 실패하던 것을 vercel.json으로 고칩니다.

작업 세부 내용

Vercel 프로젝트를 등록했더니 첫 배포가 이렇게 실패했습니다.

• Packages in scope: @piki/hooks
• Running build in 1 packages
WARNING  No tasks were executed as part of this run.
Tasks:    0 successful, 0 total

Error: No Output Directory named "public" found after the Build completed.

Vercel이 모노레포를 보고 Turborepo를 자동 감지해 turbo run build를 돌리는데, @piki/hooks에는 build task가 없어 아무것도 만들지 않고 끝납니다. 그런데도 Vercel은 "빌드가 돌았다"고 판단해 결과물을 찾으러 가고, 출력 디렉터리가 없어 실패합니다.

apps/hooks는 번들할 것이 없는 순수 함수 프로젝트라 빌드 단계 자체가 필요 없습니다. 그래서 빌드 명령을 빈 디렉터리 생성으로 갈아끼워 "빌드할 정적 산출물이 없다"는 사실을 그대로 표현했습니다.

{
  "framework": null,
  "buildCommand": "mkdir -p public",
  "outputDirectory": "public"
}
  • framework: null — 프리셋 추측으로 기본 빌드 명령·출력 경로가 끼어드는 것을 막습니다
  • api/**/*.ts는 이 설정과 무관하게 Vercel이 Root Directory 아래 api/를 스캔해 함수로 배포합니다 (TS 컴파일도 런타임이 처리)

Root Directory는 apps/hooks 그대로 둡니다. 루트로 잡으면 함수 탐색 기준이 레포 루트가 되어 apps/hooks/api/**가 함수로 안 잡히고, web 프로젝트와 vercel.json 공간이 겹칩니다. 반면 apps/hooks로 두어도 install은 Vercel이 pnpm workspace를 감지해 레포 루트에서 돌기 때문에 (Scope: all 6 workspace projects) 잃는 것이 없습니다.

스크린샷

연관 이슈

#618

남은 1회성 셋업(도메인 연결·EAS/ASC 웹훅 등록·실측 검증)이 있어 이슈는 열어둡니다.

Summary by CodeRabbit

  • 새 기능

    • Vercel에서 웹훅 수신기를 배포할 수 있는 구성을 추가했습니다.
    • 서비스 안내용 랜딩 페이지를 추가했습니다.
    • iOS 앱 배포 이벤트 웹훅과 POST /api/webhooks/* 엔드포인트 정보를 제공합니다.
  • 문서

    • 빌드 설정, 배포 방식 및 웹훅 서명 검증 정책을 문서화했습니다.

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
piki Ready Ready Preview Sep 4, 2026 12:12pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
piki-notify Ignored Ignored Preview Sep 4, 2026 12:12pm UTC

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 23fa357d-9a3c-4c0c-bddf-9146466ee43d

📥 Commits

Reviewing files that changed from the base of the PR and between d295a58 and 169cb8f.

📒 Files selected for processing (10)
  • .github/workflows/ci.yml
  • .github/workflows/e2e.yml
  • .github/workflows/web-deploy-notify.yml
  • apps/hooks/README.md
  • apps/hooks/api/webhooks/asc.ts
  • apps/hooks/api/webhooks/eas-build.ts
  • apps/hooks/api/webhooks/eas.ts
  • apps/hooks/lib/release.ts
  • apps/hooks/public/index.html
  • apps/hooks/tsconfig.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: adc95b99-7c8e-4072-85dd-7ff54d0998cf

📥 Commits

Reviewing files that changed from the base of the PR and between 0db6927 and d295a58.

📒 Files selected for processing (3)
  • apps/hooks/README.md
  • apps/hooks/public/index.html
  • apps/hooks/vercel.json

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

hooks 앱의 Vercel 배포 구성을 추가했습니다. API 함수 배포를 유지하고, public/index.html 안내 페이지를 제공하며, 빌드 동작을 README에 문서화했습니다.

Changes

hooks Vercel 배포

Layer / File(s) Summary
Vercel 빌드 설정과 배포 안내
apps/hooks/vercel.json, apps/hooks/public/index.html, apps/hooks/README.md
Vercel에 no-op 빌드 명령과 public 출력 디렉터리를 설정했습니다. 웹훅 수신기와 POST /api/webhooks/* 엔드포인트를 안내하는 정적 페이지를 추가했습니다. 배포 동작을 README에 설명했습니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to d295a

This change configures the hooks service for Vercel deployment and provides a static 안내 page for the public output directory. The deployment configuration is ready to merge with no identified current-head risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 apps/hooks의 Vercel 빌드 설정 추가라는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/618-hooks-vercel-config

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.

@vercel
vercel Bot temporarily deployed to Preview – piki September 4, 2026 12:04 Inactive
@iOdiO89

iOdiO89 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

작업 변경사항 정리

초기 접근(vercel.json 추가)에서 출발했지만, 배포를 실측하는 과정에서 진짜 원인이 따로 있다는 게 드러나 최종 형태가 크게 바뀌었습니다. 본문이 초기 접근 기준이라 여기에 최종 상태를 정리합니다.

1. 함수가 전부 죽던 원인 — tsconfig.jsonnoEmit

배포는 성공으로 뜨는데 모든 엔드포인트가 FUNCTION_INVOCATION_FAILED 로 죽었습니다. Vercel Authentication 이 프리뷰를 가리고 있어 밖에서는 보이지 않던 상태였습니다.

프로브로 범위를 좁힌 결과:

프로브 내용 결과
.ts (import 없음, named export) 500
.ts (import 없음, default export) 500
.ts (클래식 (req, res), 웹 전역 미사용) 500
.mjs (TS 미경유) 200

코드 내용과 무관하게 .ts 만 전부 실패 → TS 컴파일 단계 문제. Vercel 은 함수를 빌드할 때 프로젝트 tsconfig.json 을 그대로 쓰는데 "noEmit": true 가 걸려 있어 JS 를 하나도 내보내지 않았습니다. 빈 함수가 배포되니 무엇을 넣어도 죽었습니다.

  • noEmit 제거 (check-typestsc --noEmit 플래그로 검사하므로 영향 없음)
  • emit 형식 정합: module: ESNext / moduleResolution: Bundler 오버라이드 제거 → base 의 NodeNext 상속
  • NodeNext ESM 이므로 상대 import 에 .js 확장자 추가

검증 (프리뷰):

POST /api/webhooks/eas-build → 500 {"error":"server misconfigured"}
POST /api/webhooks/eas       → 500 {"error":"server misconfigured"}
POST /api/webhooks/asc       → 500 {"error":"server misconfigured"}

Vercel 의 크래시 페이지가 아니라 핸들러가 직접 낸 JSON 입니다. 환경변수만 없는 상태이고 함수는 정상입니다.

2. 빌드 설정은 vercel.json 대신 대시보드

한 번은 vercel.json 으로 넣었다가 대시보드 관리로 정리했습니다. 레포에 vercel.json 은 남지 않습니다. 설정값과 근거는 apps/hooks/README.md 의 표에 적어뒀습니다.

설정
Framework Preset Other
Build Command (Override) echo skip
Output Directory (Override) public
Root Directory → Skip deployment

Build Command 를 비우면 Turborepo 자동 감지가 turbo run build 를 돌리는데 @piki/hooks 에는 build task 가 없어 출력 디렉터리를 못 찾고 실패합니다. Output Directory 는 없어도, 비어 있어도 거부되므로 빈 public/index.html 을 채움용으로 둡니다.

3. 배포 알림 오탐 차단

Vercel 프로젝트가 둘이 되면서 환경 이름에 프로젝트명이 붙기 시작했는데(Production – piki-notify), 게이트가 Production* 와일드카드라 hooks 배포 실패가 ❌ [WEB·PROD] PiKi 배포 실패 로 나갔습니다.

 85  Preview                    ← 단일 프로젝트 시절
  5  Production                 ←
  1  Production – piki-notify   ← 오알림

웹 프로젝트로 한정하고, 접미사 없는 옛 이름도 계속 받도록 했습니다. deployment_status 는 default 브랜치 워크플로우만 실행되므로 dev 머지 후부터 적용됩니다.

4. E2E 워크플로우 분리

브라우저 설치 + 웹 빌드까지 하는 무거운 job 이 apps/hooks 전용 커밋에서도 돌고 있었습니다. e2e.yml 로 분리하고 경로 필터를 걸었습니다 — 웹이 의존하는 packages/core 도 포함했습니다.

Lint, Type Check 는 필터 없이 그대로 둡니다. turbo 로 hooks 까지 검사하는 job 이고, dev 의 유일한 required check 라 경로 필터를 걸면 hooks-only PR 의 머지가 막힙니다.

머지 후 남은 셋업 (#618 체크리스트)

  • 환경변수 5개 Production 스코프에 등록
  • 두 Vercel 프로젝트에 Skip deployment 토글
  • hooks.piki.day 확인 — 401 {"error":"invalid signature"} 가 나오면 정상
  • EAS·ASC 웹훅 등록 (도메인이 살아난 뒤에)

@iOdiO89
iOdiO89 merged commit eb10136 into dev Sep 4, 2026
10 checks passed
@iOdiO89
iOdiO89 deleted the chore/618-hooks-vercel-config branch September 4, 2026 12:21
@iOdiO89 iOdiO89 changed the title chore: hooks 웹훅 수신기 Vercel 빌드 설정 추가 fix: hooks 함수가 배포되지 않던 tsconfig noEmit 수정 및 배포 워크플로우 정리 Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants