blitz build does not return correct exit codes

Created on 12 Oct 2020  路  3Comments  路  Source: blitz-js/blitz

What is the problem?

Command blitz build doesn't return correct exit codes.
It returns 0 even if the build fails.

Steps to Reproduce

  1. Have a syntactical error in your code
  2. Run blitz build

Versions

macOS Big Sur | darwin-x64 | Node: v14.12.0

blitz: 0.24.1 (global)
blitz: 0.24.1 (local)

  Package manager: npm 
  System:
    OS: macOS 11.0
    CPU: (4) x64 Intel(R) Core(TM) i3-8100B CPU @ 3.60GHz
    Memory: 10.66 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.12.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.8 - /usr/local/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/cli: 2.8.1 => 2.8.1 
    @prisma/client: 2.8.1 => 2.8.1 
    blitz: 0.24.1 => 0.24.1 
    react: 0.0.0-experimental-7f28234f8 => 0.0.0-experimental-7f28234f8 
    react-dom: 0.0.0-experimental-7f28234f8 => 0.0.0-experimental-7f28234f8 
    typescript: 4.0.3 => 4.0.3 

Other

Return code does not equal the next build return code

Failed to compile.

./pages/api/runtime-estimate.ts:24:65
Type error: Cannot find name 'a'.

  22 |     try {
  23 |       const data = await ssrGetRuntimeEstimate(params)
> 24 |       const parsedData = await RuntimeEstimateSchema.parseAsync(a)
     |                                                                 ^
  25 |       res.status(200).json(parsedData)
  26 |     } catch (ex: any) {
  27 |       res.status(500).json({ error: "Internal server error" })
info  - Creating an optimized production build .'next build' failed with status code: 1

# mhaehnel @ Mark-MacMini:
$ echo $?    
0
hacktoberfest kinbug statudone

All 3 comments

Thanks for raising this 馃槂. I believe this issue is here where the result of spawn.sync is being ignored.

Thanks for the pointer.
I will take a look at it and fix this in a PR.

PR submitted.
By the way, love the docs for "How to Contribute". Great work! 馃敟

Was this page helpful?
0 / 5 - 0 ratings