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
Getting a crash when a file / folder change occurs but is deleted before executing validating the path
node:internal/event_target:1101 process.nextTick(() => { throw err; }); ^ Error: ENOENT: no such file or directory, stat 'D:\Projects\web\.vs\web\FileContentIndex\merges' at statSync (node:fs:1740:25) at file:///D:/Projects/web/node_modules/vite-plugin-checker/dist/glob.js:25:68 at matchPatterns (file:///D:/Projects/web/node_modules/vite-plugin-checker/node_modules/chokidar/esm/index.js:63:13)
Reproduction
trigger a file/folder validation check but delete that item before plugin finishes executing check
as it's dependant on execution time you might be able to add a break point in to your code to delay the check while you delete the file/folder in question
Expected behavior
path validation doesn't cause the plugin to crash when it fails to validate a non-existent path
it looks as if using statSync in glob.js will cause a throw if the path which you are checking no longer exists at the time of verification.
adding throwIfNoEntry as a secondary parameter to the function and updating the isDirectory check call to only be called if the returned value is defined seems to fix the issue.
Describe the bug
Getting a crash when a file / folder change occurs but is deleted before executing validating the path
node:internal/event_target:1101 process.nextTick(() => { throw err; }); ^ Error: ENOENT: no such file or directory, stat 'D:\Projects\web\.vs\web\FileContentIndex\merges' at statSync (node:fs:1740:25) at file:///D:/Projects/web/node_modules/vite-plugin-checker/dist/glob.js:25:68 at matchPatterns (file:///D:/Projects/web/node_modules/vite-plugin-checker/node_modules/chokidar/esm/index.js:63:13)
Reproduction
trigger a file/folder validation check but delete that item before plugin finishes executing check
as it's dependant on execution time you might be able to add a break point in to your code to delay the check while you delete the file/folder in question
Expected behavior
path validation doesn't cause the plugin to crash when it fails to validate a non-existent path
System Info
Additional context
it looks as if using statSync in glob.js will cause a throw if the path which you are checking no longer exists at the time of verification.
adding throwIfNoEntry as a secondary parameter to the function and updating the isDirectory check call to only be called if the returned value is defined seems to fix the issue.
Validations
The text was updated successfully, but these errors were encountered: