내용으로 건너뛰기

my amplify deploy app problem

0

dear supporter, i deploy nuxt app, but my amplify app, don't know command start, startCommand: "node start server/index.mjs", but got error 404 https://nuxt.d2nn56hcyc7by2.amplifyapp.com/

질문됨 일 년 전361회 조회

3개 답변
0

I understand you're having issues deploying your Nuxt app on AWS Amplify. The 404 error you're encountering suggests that Amplify is not correctly serving your application. This could be due to a mismatch between your start command and the actual entry point of your Nuxt application.

For Nuxt applications, the start command typically depends on how you've set up your project. Instead of "node start server/index.mjs", you might want to try one of these commands in your Amplify configuration:

  1. "npm run start" - if you have a start script defined in your package.json
  2. "nuxt start" - for Nuxt 2 applications
  3. "node .output/server/index.mjs" - for Nuxt 3 applications in server-side rendering mode

To resolve this issue:

  1. Check your package.json file to ensure you have the correct start script defined.
  2. Verify that your Amplify configuration (amplify.yml or build settings in the Amplify console) is using the correct build and start commands for your Nuxt version.
  3. Make sure all necessary dependencies are installed during the build process.
  4. Review your Amplify build logs to see if there are any errors during the build or deploy stages.

If the issue persists after trying these steps, you may need to reach out to AWS Support for more specific assistance with your Amplify configuration and Nuxt deployment. They can provide tailored guidance based on your exact setup and build logs.
Sources
on amplify react app deploy issue | AWS re:Post
Unable to deploy Next JS app on Amplify (Please reach out to your support representative.) | AWS re:Post

답변함 일 년 전

0

version: 1 frontend: phases: preBuild: commands: - corepack enable - npx --yes nypm i build: timeoutInMinutes: 30 commands: - pnpm run build artifacts: baseDirectory: .output files: - "**/*"

settings: nodeVersion: "18" startCommand: "node .output/server/index.mjs"

my start in package.json is "node .output/server/index.mjs"

still 404 error plz check my amplify.yaml

답변함 일 년 전

0

hi any one help me for this situatation ?

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.