Removed parse-email-address prepare hook that broke Docker dev build#28972
Conversation
The prepare: pnpm build script (added in #28969) runs during pnpm install, including inside the ghost-dev Docker image build. That stage only copies workspace package.json files into the image (not src/), so tsc finds no input files and exits 1 with help output. Docker build fails, pnpm dev cannot start. Removed the prepare hook. Type resolution for the build/index.d.ts output still works for developers who have run a prior build (pnpm build inside ghost/parse-email-address) or who run ghost/core lint:types (which explicitly builds parse-email-address first). A more robust fix for the type-resolution gap would be to surface src as the types path in the exports field; tracking separately. ref #28969 no ref
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ 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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:integration |
✅ Succeeded | 2m 45s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 3s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 52s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 30s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 1s | View ↗ |
nx run-many -t test:unit -p @tryghost/parse-ema... |
✅ Succeeded | 3s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 5s | View ↗ |
nx run-many -t lint -p @tryghost/parse-email-ad... |
✅ Succeeded | <1s | View ↗ |
Additional runs (2) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-29 20:19:28 UTC

Problem
The
prepare: pnpm buildscript added in #28969 runs duringpnpm install, including inside the ghost-dev Docker image build. That build stage only copies workspacepackage.jsonfiles into the image (notsrc/directories), sotscfinds no input files, prints help output, and exits 1. Docker build fails,pnpm devcannot start.Fix
Removed the prepare hook. One-line change.
Type-resolution gap
The original motivation for adding prepare: ghost/core type-checks against parse-email-address types at
build/index.d.ts. Without prepare, a fresh-clone dev session has nobuild/until a manual build runs. Today this is mitigated by ghost/core'slint:typesscript which explicitly builds parse-email-address first, and by anyone who has ever runpnpm devin the old fan-out (which kepttsc --watchrunning). A cleaner fix to track separately: exposesrc/index.tsas the types path in the exports field so node10 resolution doesn't need a build artifact.ref #28969