question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Even if `nuxt-ts build` fails, the status code will always be zero.

See original GitHub issue

Version

nuxt-ts

Reproduction link

https://github.com/iwata/nuxt.js/tree/build-bug

Steps to reproduce

$ git clone git@github.com:iwata/nuxt.js.git
$ cd ./nuxt.js
$ git checkout -t origin/build-bug
$ cd examples/typescript-tsx
$ yarn install
$ yarn build
$ echo $?

What is expected ?

echo $? will show 1.

What is actually happening?

echo $? shows 0.

Additional comments?

If nuxt build fails in v2.4.0, it will be status code 1 as expected.

<div align="right">This bug report is available on Nuxt community (#c8570)</div>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pimliecommented, Feb 21, 2019

That error is catched here and it logs the error with consola.error instead of consola.fatal which means the exit code is not set. The fix in nuxt/nuxt.js#4806 does not apply because the exception is catched and does not traverse up to that fix.

Btw @iwata, nice bug report with the screencast. Very helpful! 👍

0reactions
iwatacommented, Feb 27, 2019

I tried again by v2.4.5 and fixed this issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

serverless returns 0 exit code when next build fails · Issue #403
When the next.js build fails, the serverless cli still returns a zero exit code. This is particularly troublesome on CI, where the build...
Read more >
Fetch error when building Next.js static website in production
As getStaticProps runs only on the server-side, it will never run on the client-side. It won't even be included in the JS bundle...
Read more >
Advanced Features: Error Handling - Next.js
Error Handling. This documentation explains how you can handle development, server-side, and client-side errors. Handling Errors in Development. When there ...
Read more >
Going to Production - Next.js
Before taking your Next.js application to production, here are some recommendations to ensure the best user experience.
Read more >
Incremental Static Regeneration - Data Fetching - Next.js
Learn how to create or update static pages at runtime with Incremental ... If the background regeneration fails, the old page would still...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found