Dev.to
6/19/2026
pnpm workspaces in a monorepo: the setup that survived CI on Railway and the problems the docs don't warn you about
Short summary
pnpm workspaces is the best monorepo option for TypeScript in 2026, but local development masks three CI failures that only appear on platforms like Railway. Main traps: phantom dependencies (using undeclared packages), improper shamefully-hoist configuration, and misunderstanding --filter build order. Solutions include strict node-linker=isolated locally, granular hoist-pattern hoisting, and three-dot syntax (pnpm --filter=dashboard...) for correct build graphs.
- •pnpm workspaces hides three CI traps that don't appear in official docs or local development
- •Phantom dependencies silently break in CI when a transitive dependency isn't explicitly declared
- •Use node-linker=isolated locally, granular hoist-pattern config, and three-dot --filter syntax to fix Railway deployments
Generated with AI, which can make mistakes.
Is this a good recommendation for you?

