aws-amplify / aws-amplify/amplify-hosting
CustomerError: Can't find required-server-files.json in build output directory
- 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
Build settings
### Is your feature request related to a problem? Please describe:
2025-05-12T09:20:31.373Z [INFO]: web:build: ▲ Next.js 14.2.9
2025-05-12T09:20:31.374Z [INFO]: web:build:
2025-05-12T09:20:31.470Z [INFO]: web:build: Creating an optimized production build ...
2025-05-12T09:23:22.511Z [INFO]: web:build: ✓ Compiled successfully
2025-05-12T09:23:22.516Z [INFO]: web:build: Linting and checking validity of types ...
2025-05-12T09:24:14.838Z [INFO]: Tasks: 13 successful, 13 total
Cached: 0 cached, 13 total
Time: 5m8.433s
2025-05-12T09:24:16.186Z [INFO]: # Completed phase: build
## Completed Frontend Build
2025-05-12T09:24:16.380Z [INFO]: ## Build completed successfully
2025-05-12T09:24:16.386Z [INFO]: # Starting caching...
2025-05-12T09:24:16.394Z [INFO]: # Creating cache artifact...
2025-05-12T09:25:56.532Z [INFO]: # Created cache artifact
2025-05-12T09:25:56.658Z [INFO]: # Uploading cache artifact...
2025-05-12T09:26:25.786Z [INFO]: # Uploaded cache artifact
2025-05-12T09:26:25.932Z [INFO]: # Caching completed
2025-05-12T09:26:25.947Z [ERROR]: !!! CustomerError: Can't find required-server-files.json in build output directory
2025-05-12T09:26:25.948Z [INFO]: # Starting environment caching...
2025-05-12T09:26:25.948Z [INFO]: # Environment caching completed
### Describe how you'd like this feature to work
always build failed. no build error. why?
Contributor guide
Research direction
Start with the provided Amplify build log and the reported Next.js 14.2.9 build settings, then reproduce the successful build followed by the missing required-server-files.json error. Done means identifying whether the failure is in the build configuration or Amplify's output detection and documenting a verified fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, next.js
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100