aws-amplify / aws-amplify/amplify-hosting
Amplify Next.js-based frameworks `/_next/static/chunks` are not loaded (Not found 404)
- 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 read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
### App Id
d35l0i306pp307
### AWS Region
eu-north-1
### Amplify Hosting feature
Frontend builds
### Frontend framework
Next.js
### Next.js version
`13.5.2`
### Next.js router
App Router
### Describe the bug
When deploying a Keystone6 (Next.js-based CMS), the static chunks are not loaded on Amplify, while on Railway (another hosting) it works as expected.
### Expected behavior
Load the /admin dashboard.
### Reproduction steps
1. Install Keystone@latest
2. Deploy with the build settings below
3. Visit the website.
### Build Settings
```yaml
version: 1
frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: .keystone/admin/.next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
```
### Log output
```
# Put your logs below this line
```
### Additional information
## Here are screenshots from the app hosted on **Amplify** `[broken]`
### 1
### 2
## Here is the same from Railway `[working]`
## And here is the CMS project's root:
Contributor guide
Assessment
This issue has not been assessed yet.