Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

281
Visualizações
AWS Amplify hosted Nuxt app's build does not fail on error

I have a website written with Nuxt js and I am hosting it in AWS Amplify. I have a large issue. When something fails in the nuxt generate command (ex: a JavaScript error within the code I push), the build still works and it produces a broken website. Below is my build command:

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm install
        - echo "API_URL=$API_URL" >> .env 
    build:
      commands:
        - npm run generate --fail-on-error
  artifacts:
    # IMPORTANT - Please verify your build output directory
    baseDirectory: dist
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

I thought --fail-on-error was supposed to force the build to fail, but this is not what I'm seeing.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Using npm run generate --fail-on-error && proceed_the_CI fixed the issue because it allowed to double-check that the previous command is successfully built before going forward.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda