Skip to content

Turborepo: turbo.json not copied during build, causing build failures #434

@mario-loomia

Description

@mario-loomia

Description

When deploying a Turborepo monorepo with Railpack, the turbo.json configuration file is not being copied into the build context during the install step, which causes the build step to fail with:

x Could not find turbo.json or turbo.jsonc.

Reproduction

  1. Create a Turborepo monorepo with a turbo.json file
  2. Deploy to Railway using Railpack
  3. Railpack auto-generates a build plan
  4. The install step copies package.json files but NOT turbo.json
  5. The build step runs npx turbo run build --filter=api but fails because turbo.json is missing

Expected Behavior

turbo.json should be automatically included in the build context when Railpack detects a Turborepo project (detects turbo.json in the repo).

Actual Behavior

The auto-generated build plan only copies dependency-related files (package.json, pnpm-lock.yaml, etc.) but skips project-level config files like turbo.json.

Workaround

Currently no workaround found. Attempting to add custom build steps to railpack.json but unclear how to include files in the intermediate layers.

Environment

  • Railpack version: 0.16.0
  • Node version: 22.22.0
  • Package manager: pnpm 10.24.0
  • Monorepo structure: 22 packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions