You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, place some files in the sync/ directory.
Run the following code:
import{watch}from"npm:chokidar";main();asyncfunctionmain(){constwatcher=watch("sync/",{atomic: true,ignoreInitial: true,});watcher.on("add",(path,stats)=>console.info(`File ${path} has been added`)).on("change",(path,stats)=>console.info(`File ${path} has been changed`)).on("unlink",(path)=>console.info(`File ${path} has been removed`)).on("error",(error)=>{console.error("Error:",error);});awaitnewPromise((resolve)=>watcher.on("ready",resolve));console.info(`Watching: ${JSON.stringify(watcher.getWatched())}`);}
Create some file in sync directory.
Expected Behavior
It should print watching: <at least 3 items>, and detect file changes.
Actual Behavior
watching: {"D:\\":["sync"],"D:\\sync":[]}
It doesn't detect file changes.
Additional Context
I suspect the cause is the node:fs stat polyfill returning mode: null on windows. This seems like a regression because it broke my script, but from the history, It looks like this issue has been around for a while. I'm very curious about this issue.
Version: Deno 1.43.6
Steps to Reproduce
sync/
directory.sync
directory.Expected Behavior
It should print
watching: <at least 3 items>
, and detect file changes.Actual Behavior
It doesn't detect file changes.
Additional Context
I suspect the cause is the
node:fs
stat polyfill returningmode: null
on windows. This seems like a regression because it broke my script, but from the history, It looks like this issue has been around for a while. I'm very curious about this issue.The text was updated successfully, but these errors were encountered: