KyleJune
Using Deno.Command to run tailwindcss with watch flag not working
If I do
new Deno.Command(Deno.execPath(), {args:["run", "-A", "npm:tailwindcss", "-i", "./styles.css", "-o", "./public/styles.css", "--watch"]})
, no watching happens and the output file doesn't get updated. The npm package running doesn't seem to get the watch argument or the output anymore.
But if I run npx tailwindcss -i ./styles.css -o ./public/styles.css --watch
, It updates the file and watches for changes based on the tailwind.config.js
. Is this expected or am I doing something wrong? I'm just trying to spawn a process to do the same as npx. Should I just use "npx"
instead of Deno.execPath()
?4 replies
Leaking resources from inbound HTTP connections in tests
Anyone have any ideas why I would be getting the following error. I'm using an oak server that is started before all the tests and closed after they all finish.
It happens in all test cases after the first. I await the response, so I'm not sure why the connection is still considered open when the test ends. All the assertions pass, the only thing that causes failure is the leaking resource. In oak I don't see an option to close the response.
10 replies
Killing subprocess not working
Anyone know what I'm doing wrong when trying to kill a process?
I have a process start another process like this:
My child process uses deno task and the run-dev task starts an oak server.
Then if a file changes, I kill it with this.
But I found that the server oak server keeps listening after I sent those. I tried awaiting
runProcess.status()
afterwards and it does resolve to { success: false, code: 143, signal: 15 }
indicating it was killed, but the server is able to keep handling requests and if I try starting a new run-dev task, it will fail with an error saying the address is already in use. So it would appear the oak server isn't getting killed correctly. I even tried adding a 30 second delay between killing and restarting but it still fails to kill it.
The following output shows that I killed the process, but the oak server still was able to handle requests afterwards.
9 replies