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
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.
The text was updated successfully, but these errors were encountered:
Version
v18.16.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
internal/watch_mode/files_watcher.js
What steps will reproduce the bug?
Use
node --watch script.js
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?
Additional information
The reason for the error is the call
resolve
without checking if the name is not nullnode/lib/internal/watch_mode/files_watcher.js
Lines 93 to 94 in 9398ff1
Regardles to documentation:
The text was updated successfully, but these errors were encountered: