Open Nicholaiii opened 1 year ago
I can't do this without dependencies, ultimately my example is piping into one.
That's fine if you can strip it down to bare minimums. Please provide a link to a minimal reproduction repository.
https://github.com/Nicholaiii/tsx-pipe
I am now only getting this issue on the first log line. I have no idea what (if anything) changed.
npm run normal
(works immediately)
npm run watch
(works after first log)
Same thing is happening when using concurrently
to run tsx watch, no console output at all.
@piotrek-szczygiel
Thanks for your comment! But, with the limited info provided, I'm not sure if it's relevant to this thread, so I'm gonna hide it for now.
If you can share more details and steps to reproduce in a new Issue, that would be super helpful. Thanks, and let me know if you need any help.
@privatenumber I have the same problem too
I run npx tsx watch src/intex.ts | jg
but the output from the program isn't parsable by jq and I get parse error: Invalid numeric literal at line 1, column 3
If I run npx tsx src/intex.ts | jg
it works just fine.
src/index.ts can be as simple as:
console.log(`{"message": "Hello World!"}`)
Gotcha, thanks for the repro. Happy to accept a PR.
Same thing is happening when using
concurrently
to run tsx watch, no console output at all.
Same thing for me, this is the only reason I cant switch from ts-node.
Bug description
When using watch mode, piping stdout is broken, it doesn't do anything at all, just prints straight to console. It works without watch.
Reproduction
I can't do this without dependencies, ultimately my example is piping into one.
Environment
Can you work on a fix?