0

On my windows 10 with nodejs and visualstudio code installed, I just can't debug with VS code even with sample code by Microsoft- https://code.visualstudio.com/docs/runtimes/nodejs

The error is "request 'launch': cannot launch target(reason:spawn node ENOENT)", which looks like to be some configuration issue, and checked nodejs did install under C:\Program Files\nodejs.

I saw one same question on stackoverflow - visual studio code nodejs request 'launch': cannot launch target (reason: spawn node ENOENT) , but there's no help answer, would anyone have suggestion on this? Thanks in advance!

Community
  • 1
  • 1

1 Answers1

0

I am pretty sure this is because node has not been added to your PATH. That is to say, you can't just type "Node" anyway in command line and have it correctly open your Node installation.

Double check that Node is correctly added to your path first, then try again.

Tobiah Zarlez
  • 1,680
  • 1
  • 12
  • 13
  • Thanks Tobiah, I forgot to come back that VS code debug already works for me after I made some change and reboot. Sharing way i tried in case someone else hit similar issue - By default, I saw C:\Program Files\nodejs in Path, but it didn't work, I manually copied nodejs and rename to node, then put C:\Program Files\node in Path as well, reboot and now debug works for me! – Jianfeng Zhu Mar 02 '16 at 02:17