PS> node '.\asd 3.js' | .\node_modules\.bin\bunyan.cmd
[2022-07-27T02:56:48.222Z] INFO: beans/3192 on Teamy-Desktop: Starting
[2022-07-27T02:56:48.226Z] INFO: beans/3192 on Teamy-Desktop: howdy
It took me longer than it should have to realize there was a .cmd version of the bin file, rather than some weird magical extension behaviour with powershell causing it to work.
Problem
The non-cmd bin file works to format log entries from a piped node process, unless that process is running an http server.
Versions
node: v18.6.0 bunyan: "^1.8.15" typescript: "^4.7.4"
Demo
asd 3.js
Desired, but not working
No formatting
Works
It took me longer than it should have to realize there was a
.cmd
version of the bin file, rather than some weird magical extension behaviour with powershell causing it to work.asd 2.js
Works without using the .cmd