Skip to content

fix(deploy): per-package pnpm (workspace broke Railway) - #17

Merged
JustAGhosT merged 1 commit into
mainfrom
fix/pnpm-per-package
May 9, 2026
Merged

fix(deploy): per-package pnpm (workspace broke Railway)#17
JustAGhosT merged 1 commit into
mainfrom
fix/pnpm-per-package

Conversation

@JustAGhosT

@JustAGhosT JustAGhosT commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

The pnpm workspace landed in #16, but Railway's services have rootDirectory=backend|frontend set, so nixpacks only copies that subdir into the build context. The workspace lockfile + manifest at the repo root are not visible from inside the build, so cd .. && pnpm install failed with ERR_PNPM_NO_PKG_MANIFEST.

This PR drops the workspace and makes each package self-contained:

  • packageManager: "pnpm@10.33.2" + pnpm.onlyBuiltDependencies: ["esbuild"] pinned in each package.json
  • per-package pnpm-lock.yaml (under backend/ and frontend/)
  • railway.toml runs corepack enable && pnpm install --no-frozen-lockfile && pnpm run build from the service rootDir

Local verification

  • cd backend && pnpm typecheck && pnpm test && pnpm build — clean, 14/14 tests passing, 2.5 MB CJS bundle
  • cd frontend && pnpm build — clean, 39 modules / 223 kB / 21 kB

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated quick-start guide to clarify that backend and frontend are now independent projects with separate installation steps.
  • Chores

    • Migrated from a monorepo workspace structure to independent backend and frontend projects.
    • Updated build configurations, package requirements, and deployment scripts accordingly.

Review Change Stack

Railway services have rootDirectory=backend|frontend, so the build
context only contains that subdir. The pnpm workspace lockfile and
manifest at the repo root are not visible from inside the build, so
`cd .. && pnpm install` failed with ERR_PNPM_NO_PKG_MANIFEST.

Drop the workspace; each package is now self-contained:
- packageManager + onlyBuiltDependencies pinned in each package.json
- pnpm-lock.yaml in each subdir
- railway.toml runs `corepack enable && pnpm install --no-frozen-lockfile && pnpm run build` in the service rootDir

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@blocksorg

blocksorg Bot commented May 9, 2026

Copy link
Copy Markdown

Mention Blocks like a regular teammate with your question or request:

@blocks review this pull request
@blocks make the following changes ...
@blocks create an issue from what was mentioned in the following comment ...
@blocks explain the following code ...
@blocks are there any security or performance concerns?

Run @blocks /help for more information.

Workspace settings | Disable this message

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2a349d98-cb00-4a9c-8e3a-d41310a9cf6e

📥 Commits

Reviewing files that changed from the base of the PR and between e66b93c and ae40f08.

⛔ Files ignored due to path filters (2)
  • backend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • README.md
  • backend/package.json
  • backend/railway.toml
  • frontend/package.json
  • frontend/railway.toml
  • package.json
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (2)
  • pnpm-workspace.yaml
  • package.json

📝 Walkthrough

Walkthrough

This PR migrates the repository from a pnpm workspace (monorepo) structure to independent backend and frontend packages with separate lockfiles and build processes. Root workspace configuration is removed, engine constraints are added per-package, build commands are updated to run independently, and documentation is clarified.

Changes

Monorepo to Independent Packages

Layer / File(s) Summary
Workspace Configuration Removal
pnpm-workspace.yaml, package.json
Root pnpm-workspace.yaml packages list and root package.json manifest (name, version, engines, scripts, pnpm config) removed to dissolve monorepo infrastructure.
Per-Package Engine Constraints
backend/package.json, frontend/package.json
backend/package.json adds pnpm >=10 engine constraint; frontend/package.json adds pnpm >=10 constraint, packageManager: "pnpm@10.33.2" declaration, and pnpm.onlyBuiltDependencies: [esbuild] configuration.
Independent Build Commands
backend/railway.toml, frontend/railway.toml
Build commands no longer cd to repo root or use pnpm --filter. Each package enables corepack, runs pnpm install --no-frozen-lockfile, and executes pnpm run build from its own directory.
Setup Documentation
README.md
Quick start instructions clarified to show corepack enable once at repo root, then pnpm install and pnpm dev run separately inside backend/ and frontend/ directories, replacing workspace-based guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • phoenixvc/baton#9: Overlapping changes to Railway build configurations and package engine constraints for backend and frontend packages.

Poem

A workspace once grand, now set free,
Backend and frontend, independenty!
Lockfiles apart, each dancing alone,
Corepack whispers, pnpm's shown.
Two seeds now growing in separate soil. 🐰

🚥 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 The title 'fix(deploy): per-package pnpm (workspace broke Railway)' directly addresses the main change—converting from a pnpm workspace to per-package configurations to fix Railway deployment issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pnpm-per-package

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.

@JustAGhosT
JustAGhosT merged commit 1a56307 into main May 9, 2026
1 check passed
@JustAGhosT
JustAGhosT deleted the fix/pnpm-per-package branch May 9, 2026 12:04
JustAGhosT added a commit that referenced this pull request May 9, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JustAGhosT added a commit that referenced this pull request May 9, 2026
* feat(frontend): /projects/:slug deep links + UI pass

Adds canonical /projects/:slug URLs (slug-or-id resolved against the
project list, mirrored via replaceState). Plus a 10-item UI batch:
light-mode elevation tokens, copy-link buttons (project + task) backed
by a new toast surface, Cmd+K command palette, dashed-border empty
kanban hints, click-to-edit markdown descriptions, density toggle,
drag-resize sidebar, and a sub-768px mobile banner.

Frontend-only. Build clean (43 modules, 235kB JS, 23kB CSS).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: drop pnpm-migration follow-up (landed in #16/#17)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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