How to execute locally installed Node.js application by child_process.spawn()?
I want to execute the Electron application by child_process.spawn : import ChildProcess, {ChildProcess as ChildProcess__type} from 'child_process'; const childProcess: ChildProcess__type = ChildProcess.spawn( 'electron', ['ProjectInitializer__ElectronMain.js'], { cwd: __dirname } // current project root ); I got Error: spawn electron ENOENT error. Electron has been installed locally, AFAIK is the good practice. Also, electron ProjectInitializer__ElectronMain.js works, it to execute this console command from my project directory. Following frequently up-voted ENOENT error debugging guidance , I