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
{{ message }}
Repository navigation
watch runner crash with ERR_INVALID_ARG_TYPE #47692
How often does it reproduce? Is there a required condition?
When third-party tool written in Java works on the same directory.
What is the expected behavior? Why is that the expected behavior?
Normal running.
What do you see instead?
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
at new NodeError (node:internal/errors:399:5)
at validateString (node:internal/validators:163:11)
at resolve (node:path:167:9)
at FSWatcher.<anonymous> (node:internal/watch_mode/files_watcher:94:30)
at FSWatcher.emit (node:events:513:28)
at FSWatcher._handle.onchange (node:internal/fs/watchers:215:12) {
code: 'ERR_INVALID_ARG_TYPE'
}
Additional information
The reason for the error is the call resolve without checking if the name is not null
filename is not always guaranteed to be provided. Therefore, don't assume that filename argument is always provided in the callback, and have some fallback logic if it is null.
Reacted by Moshe Atlow, Cameron Tacklind, Avery Morin and Dan Rose
Activity
Disable watch mode
sosoba commentedon Feb 15, 2024
#49891