客户错误:在构建输出目录中找不到 required-server-files.json

问题描述 投票:0回答:1

当我将下一个 js 应用程序部署到 AWS 放大已完成的构建时,我遇到了问题,但发生了 CustomerError 并阻止了我的部署:这是我的日志

2024-01-25T20:11:31.852Z [INFO]: 
2024-01-25T20:11:31.857Z [INFO]: Done in 175.65s.
2024-01-25T20:11:31.874Z [INFO]: # Completed phase: build
2024-01-25T20:11:31.894Z [INFO]: ## Build completed successfully
2024-01-25T20:11:31.896Z [INFO]: # Starting caching...
2024-01-25T20:11:31.909Z [INFO]: # Creating cache artifact...
2024-01-25T20:13:18.327Z [INFO]: # Created cache artifact
2024-01-25T20:13:18.480Z [INFO]: # Uploading cache artifact...
2024-01-25T20:13:28.603Z [INFO]: # Uploaded cache artifact
2024-01-25T20:13:28.703Z [INFO]: # Caching completed
2024-01-25T20:13:28.715Z [ERROR]: !!! CustomerError: Can't find required-server-files.json in build output directory
2024-01-25T20:13:28.716Z [INFO]: # Starting environment caching...
2024-01-25T20:13:28.716Z [INFO]: # Environment caching completed
Terminating logging...
typescript amazon-web-services github next.js aws-amplify
1个回答
0
投票

在amplify.yml中 这是因为 文物: 基本目录:“路径错误”

基本目录将从您在 amplify.yml 中提供的 appRoot 开始 因为它是下一个基本目录的最后一个文件夹应该类似于“dist/apps/my-app/.next

© www.soinside.com 2019 - 2024. All rights reserved.