Skip to content

Build Artifact Not Found TurboRepo Nextjs #4076

@niallmc

Description

@niallmc

Before opening, please confirm:

Amplify Hosting feature

Deployments

Is your feature request related to a problem? Please describe:

Environment

  • Framework: Next.js 16 (App Router) with output: 'standalone'
  • Monorepo: Turborepo
  • Package Manager: pnpm 10.19.0
  • Node.js: >= 20.10.0
  • React: 19
  • App Location: apps/web

amplify.yml Configuration

version: 1
applications:
  - appRoot: apps/web
    frontend:
      phases:
        preBuild:
          commands:
            - corepack enable
            - corepack prepare pnpm@latest --activate
            - pnpm install
        build:
          commands:
            - cd ../..
            - pnpm turbo run build --filter=web
      artifacts:
        baseDirectory: .next
        files:
          - "**/*"

Build completes successfully, but deployment fails with an error indicating the build artifacts cannot be found.

I can download the build artifacts in the console, and it all appears to be there, but the deploy step cant seem to find them.

[INFO]: Build Artifacts not found.
[ERROR]: {"code":"MissingBuildArtifacts"}

Describe how you'd like this feature to work

After a successful build, Amplify should find the .next directory at apps/web/.next and deploy the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions