I/O redirections on Node.js via Git Bash for Windows (Windows-users oriented)
LG
Posted on August 2, 2022
NOTE : First of all this live document oriented to Windows users as we consider ourselves using Git bash for Windows !
node.exe --inspect=[127.0.0.1:port] # herein 127.0.0.1 roughly equals to localhost ; also [angle brackets must be omitted , used just to emphasize]
[All credits to: Marco Eckstein & Phu Ngo]
Question is why we need .exe
rather than default node
, is because on Git Windows (let me emphasize – WINDOWS) a node
command for e.g. node file_name.js
invokes itself through aliased winpty resulting in "side effects (architectural quirks?)" of IO redirections / piping being unrecognized as a part of tty usually resulting in stderr message on terminal such as :
stdin: is not a tty
...
Much more of practical examples on I/O redirections or piping coming soon on this live document, stay tuned !
Posted on August 2, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
August 2, 2022