fs:watch "Command watch not found"
Hi, I'm trying out Tauri v2 for a personal project and can't seem to get the watch function from the fs plugin to work. I get the following error when trying to watch on a folder:
At first I thought this may have been because I was running in WSL2, but the screenshot above is from a regular Windows env.
If it's not a bug then it might be a permissions issue as I'll admit to finding the permissions requirements unclear. Currently they look like this:
[
"core:default",
"fs:default",
"fs:scope-home-recursive",
"fs:allow-home-read-recursive",
"fs:allow-home-write-recursive",
"fs:allow-home-meta-recursive",
"fs:allow-watch",
"fs:allow-unwatch",
"dialog:default"
]
Any confirmation/help on this front would be greatly appreciated.
Looks like it's not documented right now, but you also need to add the watch feature flag to the tauri-plugin-fs dependency in Cargo.toml, can you check that you have it?
If you do and it's still not working, please show the output of tauri info and additionally the js and rust versions of the fs plugin.
That's it working, thank you so much! 😄
This is documented in https://github.com/tauri-apps/tauri-docs/pull/2677, closing as completed