events.js:72
throw er; // Unhandled \'error\' event
^
Error: spawn ENOENT
at errnoException (chil
Environment issues
PATH
environment variable.Windows-only bugs/quirks
Wrong spawn('command', ['--argument', 'list'], { cwd, env, ...opts })
usage
opts.cwd
) does not exist · see leeroy-brun's answerString
spawn('command --wrong --argument list')
spawn('ENV_VAR=WRONG command')
Array
specified as String
spawn('cmd', '--argument list')
PATH
env variable spawn('cmd', [], { env: { variable } }
spawn('cmd', [], { env: { ...process.env, variable } }
There are 2 posible origins for
ENOENT
:
- Code you are writing
- Code you depend on
When origin is code you depend on, usual cause is an Environment Issue (or windows quirk)