You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
random TypeError and crash in REPL when entering text (v24.4.1) #59178
Starting node in REPL mode and entering a few characters in the terminal randomly crashes the REPL with the following error:
node: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)
How often does it reproduce? Is there a required condition?
I can constantly reproduce this behaviour by simply entering the text let a, the REPL itself does not even let me continue typing, it just crashes.
What is the expected behavior? Why is that the expected behavior?
The expected behavior would be to not crash after entering the above text...
What do you see instead?
This is a complete printout of the bug right from the first line after starting the REPL by typing node from the command line. I am typing the text let a and the following output gets printed instantly.
PS C:\Users\XXX> node
Welcome to Node.js v24.4.1.
Type ".help" for more information.
> let anode: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
Activity