aws-amplify / aws-amplify/amplify-hosting
Build Artifact Not Found TurboRepo Nextjs
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [x] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [x] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [x] I have removed any sensitive information from my code snippets and submission.
### 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.
Contributor guide
Research direction
Start by reviewing the shown amplify.yml configuration, especially appRoot apps/web, the build command's change to the repository root, and artifacts baseDirectory .next. Verify where Amplify resolves the artifact directory after the build; done means the deployment finds apps/web/.next and successfully deploys the Next.js application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, next.js, node.js, react
- Domain
- ci-cd, cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100