Saltar al contenido

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/

preguntada hace un año359 visualizaciones

3 Respuestas
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

respondido hace un año

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

respondido hace un año

0

hi any one help me for this situatation ?

respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.