Skip to content

Node 24.4.1 crashes in REPL after typing "let b" #59136

Closed as duplicate
Closed as duplicate

Description

@WillAvudim

Version

v24.4.1

Platform

Linux x64, MacOS aarch64

Subsystem

REPL

What steps will reproduce the bug?

Start Node.js repl by typing the following command in a terminal:
$ node

Then type in "let b". Immediately after the character "b" is entered, the REPL consistently crashes with

> let bnode:internal/readline/emitKeypressEvents:74
            throw err;
            ^

TypeError: Cannot read properties of null (reading 'start')
    at findExpressionCompleteTarget (node:repl:1722:68)
    at REPLServer.complete (node:repl:1487:55)
    at REPLServer.completer (node:repl:792:5)
    at showCompletionPreview (node:internal/repl/utils:233:10)
    at showPreview (node:internal/repl/utils:389:7)
    at REPLServer.self._ttyWrite (node:repl:1037:9)
    at ReadStream.onkeypress (node:internal/readline/interface:284:20)
    at ReadStream.emit (node:events:507:28)
    at ReadStream.emit (node:domain:489:12)
    at emitKeys (node:internal/readline/utils:371:14)

Node.js v24.4.1

How often does it reproduce? Is there a required condition?

It is always reproducible on both MacOS and debian linux.

What is the expected behavior? Why is that the expected behavior?

Not to crash.

What do you see instead?

A crash.

Additional information

No response

Activity

  1. Amirali-Amirifar commented on Jul 20, 2025

    @Amirali-Amirifar

    can confirm, also on var, but not const

  2. Renegade334 commented on Jul 21, 2025

    @Renegade334
    Member

    Duplicate of #59029.

  3. swisscodes commented on Jul 27, 2025

    @swisscodes

    can confirm also on windows 11

    PS C:\Users\Admin> node
    Welcome to Node.js v24.4.1.
    Type ".help" for more information.

    let hnode:internal/readline/emitKeypressEvents:74
    throw err;
    ^

    TypeError: Cannot read properties of null (reading 'start')
    at findExpressionCompleteTarget (node:repl:1722:68)
    at REPLServer.complete (node:repl:1487:55)
    at REPLServer.completer (node:repl:792:5)
    at showCompletionPreview (node:internal/repl/utils:233:10)
    at showPreview (node:internal/repl/utils:389:7)
    at REPLServer.self._ttyWrite (node:repl:1037:9)
    at ReadStream.onkeypress (node:internal/readline/interface:284:20)
    at ReadStream.emit (node:events:507:28)
    at ReadStream.emit (node:domain:489:12)
    at emitKeys (node:internal/readline/utils:371:14)

    Node.js v24.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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