'What's the best way to launch a child node process from vscode extension

I need to launch a node child process inside the extension. I use spawn('node', [scriptPath]) to do this. But in the extension environment, processs.env.PATH may not contain the path to Node.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source