Open richterdennis opened 9 months ago
v20.10.0
Microsoft Windows NT 10.0.22621.0 x64
No response
Create file index.mjs in a random folder of your system (I am using Win 11) with files in it.
index.mjs content:
import { watch } from 'node:fs'; const watcher = watch('./', { recursive: true }); watcher.on('change', (eventType, fileName) => console.log(eventType, fileName));
Open a console and run node index.mjs
node index.mjs
Then just browse through the folders and files and maybe open files with your IDE.
If I open a file from a random project I get for example:
change src\Config.js
Just by opening it.
fs.watch is also used in the node --watch implementation which is causing multiple reloads just because VS Code is reading some files.
node --watch
The event occurs on the first read and then after some time. I don't know more details.
The expected behavior is not triggering a change event when nothing changed.
Getting a change event triggered by opening a file..
Sometimes there is also a
change null
This behavior is truly random and I couldn't understand why... P.S. I am using v.18.16.1 on win10x64
Version
v20.10.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
No response
What steps will reproduce the bug?
Create file index.mjs in a random folder of your system (I am using Win 11) with files in it.
index.mjs content:
Open a console and run
node index.mjs
Then just browse through the folders and files and maybe open files with your IDE.
If I open a file from a random project I get for example:
Just by opening it.
fs.watch is also used in the
node --watch
implementation which is causing multiple reloads just because VS Code is reading some files.How often does it reproduce? Is there a required condition?
The event occurs on the first read and then after some time. I don't know more details.
What is the expected behavior? Why is that the expected behavior?
The expected behavior is not triggering a change event when nothing changed.
What do you see instead?
Getting a change event triggered by opening a file..
Additional information
Sometimes there is also a