Even if `nuxt-ts build` fails, the status code will always be zero.
See original GitHub issueVersion
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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:9 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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! 👍
I tried again by v2.4.5 and fixed this issue. Thanks!