When I use visual studio code to debug a nodejs app.
visual studio code tell me request 'launch': cannot launch target (reason: spawn node ENOENT)
My nodejs version is 4.2.4
Managed to get past this when running on Windows by specifying npm.cmd
instead of npm
in the VS code debug configuration like so
"runtimeExecutable": "npm.cmd",
Some discussions are posted in this here
How do I debug "Error: spawn ENOENT" on node.js?
Especially, the following points should be checked
PATH
is setPATHEXT
environment variable that can cause certain calls to spawn to not work on Windows. If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With