Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

274
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!