It turns out that the node REPL doesn't seem to behave as expected inside a domain. (I'm using node v0.10.22)
Try running repltest.js
, which is narrowed down from a much larger REPL-thing I'm working on. You'll get your REPL, but there is some weirdness. If you give it an empty line (i.e. just press Enter/Return), you'll get a syntax error, captured by the domain and ouput via line 6:
>
SyntaxError: Unexpected token )
at REPLServer.self.eval (repl.js:112:21)
at Interface.<anonymous> (repl.js:239:12)
at Interface.EventEmitter.emit (events.js:95:17)