We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
This behavior is truly random and I couldn't understand why... P.S. I am using v.18.16.1 on win10x64
Sorry, something went wrong.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: