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
child_process: confusing error message from functions with empty string argument #19235
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type string at normalizeSpawnArguments (child_process.js:389:11) ...
Compare with previous versions:
v4–v6: TypeError: Bad argument
v8–v9: TypeError: "file" argument must be a non-empty string
> TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
at validateString (internal/validators.js:125:11)
at normalizeSpawnArguments (child_process.js:414:3)
at spawnSync (child_process.js:576:16)
at execSync (child_process.js:669:13)
The same with exec()
Node v 11.10.1
UPD. ok, my bad, command was coming from async function and was wrapped in Promise.
The error The "file" argument must be of type string. Received type object might be more descriptive. 😉
Activity
child_process: better spawn error message
seyfer commentedon Nov 30, 2019
I have this now
The same with
exec()Node v 11.10.1
UPD. ok, my bad, command was coming from async function and was wrapped in Promise.
The error
The "file" argument must be of type string. Received type objectmight be more descriptive. 😉child_process: better spawn error message