`--onSuccess exit` causing a crash
omerd-cyera opened this issue · 2 comments
Hi, I was trying to use this tool to comple-watch until a successful compilation.
Here is the command i was using:
tsc-watch --onSuccess exit
here is the output:
[12:00:09] Starting compilation in watch mode...
[12:00:13] Found 0 errors. Watching for file changes.
Error: spawn exit ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
If i ignore the error message, it does what i want it to. it exits after this message.
Is there a better way of doing what I'm trying? because it seems like I'm not using this tool as intended.
Thanks
tsc-watch
uses spawn
to run a process on your system on every successful build. like restarting your sever.
calling exit
is not a process.
Also, I don't fully understand your usecase.
lets say i have a few packages that depend on each other A -(depends on)-> B -(depends on)-> C
And I merge into my branch something that breaks the build on all of them.
I would like to run something like tsc-watch --onSuccess exit
on all of them, and start fixing the compilation errors until all the packages build successfully.
Seems like its not a feature of this tool, so ill take my problem somewhere else :)
Thanks for the help.