Skip to content

one build fails to propagate errors #744

Description

@adamcarheden

Current Behavior

one build exits with success even if the app throws an error.

Expected Behavior

one build exits with error when app fails to build.

One Version

1.18.1

Platform (Web, iOS, Android)

Web

Reproduction

1. Create a new one app with `npx one`. Use all the defaults.
2. Add an error:


$ git diff
diff --git a/app/index.tsx b/app/index.tsx
index 472d45e..9f08bb4 100644
--- a/app/index.tsx
+++ b/app/index.tsx
@@ -2,6 +2,7 @@ import { Link } from 'one'
 import { Text, View } from 'react-native'
 
 export function Index() {
+  throw new Error("Demo SSR bug")
   return (
     <View
       style={{

3. Run `npm exec one build; echo $?`.

   Note `Error: Demo SSR bug` and a stack trace in the build output, but that npm exited with success anyway.

System Info

$ npx envinfo --system --npmPackages --binaries --browsers

  System:
    OS: Linux 6.18 Arch Linux
    CPU: (32) x64 AMD Ryzen 9 9950X 16-Core Processor
    Memory: 78.74 GB / 91.90 GB
    Container: Yes
    Shell: 5.3.15 - /usr/bin/bash
  Binaries:
    Node: 26.4.0 - /usr/bin/node
    Yarn: 1.22.22 - /home/adam/.local/share/pnpm/yarn
    npm: 11.16.0 - /usr/bin/npm
    pnpm: 11.6.0 - /usr/bin/pnpm
    bun: 1.3.14 - /usr/bin/bun
    Deno: 2.9.1 - /usr/bin/deno
  Browsers:
    Firefox: 152.0.4
    Firefox Developer Edition: 152.0.4
  npmPackages:
    @react-native-community/cli: ^20.1.2 => 20.2.0 
    @react-navigation/native: ~7.2.2 => 7.2.6 
    @types/react: ^19.2.2 => 19.2.17 
    expo: ~55.0.7 => 55.0.28 
    one: ^1.18.1 => 1.21.12 
    react: 19.2.0 => 19.2.0 
    react-dom: 19.2.0 => 19.2.0 
    react-native: 0.83.2 => 0.83.2 
    react-native-reanimated: ~4.2.1 => 4.2.3 
    react-native-safe-area-context: ~5.6.2 => 5.6.2 
    react-native-screens: ~4.23.0 => 4.23.0 
    react-native-web: ^0.21.2 => 0.21.2 
    react-native-worklets: ~0.7.4 => 0.7.4 
    vite: ^8.0.13 => 8.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions