`deno task dev` not working because `--watch` doesn't detect changes
I've run
deno task dev
on a new project from deno init
and so it should be running the task deno run --watch main.ts
. But when I change main.ts
the command does not re-run. The output remains statically:
What am I doing wrong? I'm using Deno 2.0.4, Warp as my terminal, and zsh as my shell. I'm on macOS 14.2.1. Is this a bug?3 Replies
It's probably running correctly, when Watcher reruns your file it clears the terminal so you won't always see previous output. So if the output isn't changing then you'll have a hard time noticing that the file was rerun unless you have it print something different on each file change.
If you want to test this you could try an experiment and have it log the current time, if it's not printing the new current time each time you save the file then there might be a problem.
Also you should consider updating your Mac. Sonoma 14.7.1 is available or you can upgrade to Squoia 15.1. Regardless, you're running nearly a whole year behind on security updates!
Can you open an issue on github?
I think I can do that