lastError

The last error raised inside the REPL (assigned to the _error variable inside of the REPL).

Since

v9.8.0

See also

https

://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable