ryan@DevPC-LX:~/stuff/ok$ nodejs repl.js
oK v0.1
fs.js:651
var r = binding.read(fd, buffer, offset, length, position);
^
Error: EAGAIN: resource temporarily unavailable, read
at Error (native)
at Object.fs.readSync (fs.js:651:19)
at readchar (/media/ryan/stuff/ok/repl.js:15:5)
at readline (/media/ryan/stuff/ok/repl.js:19:34)
at Object.<anonymous> (/media/ryan/stuff/ok/repl.js:46:14)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
ryan@DevPC-LX:~/stuff/ok$
A quick Google found this, which mentioned that Node's stream interfaces are "still in flux". Maybe you should just use readline?
This is what happens when I run
nodejs repl.js
:A quick Google found this, which mentioned that Node's stream interfaces are "still in flux". Maybe you should just use readline?