Skip to content

fix(cli): fix crash when exiting Metro server in 0.83#3683

Merged
tido64 merged 1 commit into
mainfrom
tido/cli/fix-exit-crash
Jul 23, 2025
Merged

fix(cli): fix crash when exiting Metro server in 0.83#3683
tido64 merged 1 commit into
mainfrom
tido/cli/fix-exit-crash

Conversation

@tido64
Copy link
Copy Markdown
Member

@tido64 tido64 commented Jul 22, 2025

Description

Exiting the Metro server crashes starting with 0.83:

% yarn start

                        ▒▒▓▓▓▓▒▒
                     ▒▓▓▓▒▒░░▒▒▓▓▓▒
                  ▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒
                 ▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓
                 ▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓
                 ▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▒▒▒▒▓▓▓▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▓▓
                 ▓▓▒░░▒▒▓▓▓▓▓▓▓▓▒░░░▒▓▓
                  ▒▓▓▓▒░░░▒▓▓▒░░░▒▓▓▓▒
                     ▒▓▓▓▒░░░░▒▓▓▓▒
                        ▒▒▓▓▓▓▒▒


                Welcome to Metro v0.83.0
              Fast - Scalable - Integrated


┃ Open developer menu                  D
┃ Open debugger                        J
┃ Show bundler address QR code         Q
┃ Reload the app                       R
┠───────────────────────────────────────
┃ Show this help message               H
┃ Quit                            Ctrl-C

info Exiting...
node:internal/readline/emitKeypressEvents:74
            throw err;
            ^

TypeError: server.close is not a function
    at process.<anonymous> (/~/node_modules/@rnx-kit/cli/lib/serve/keyboard.js:75:16)
    at process.emit (node:events:518:28)
    at ReadStream.<anonymous> (/~/node_modules/@rnx-kit/cli/lib/serve/keyboard.js:90:29)
    at ReadStream.emit (node:events:518:28)
    at emitKeys (node:internal/readline/utils:370:14)
    at emitKeys.next (<anonymous>)
    at ReadStream.onData (node:internal/readline/emitKeypressEvents:64:36)
    at ReadStream.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)

Node.js v22.15.0

Test plan

n/a

@github-actions github-actions Bot added the feature: cli This is related to CLI label Jul 22, 2025
@tido64 tido64 merged commit caf3b28 into main Jul 23, 2025
13 checks passed
@tido64 tido64 deleted the tido/cli/fix-exit-crash branch July 23, 2025 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: cli This is related to CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants