-1

could somebody help me handle this issue? Explain to me why it happens, please. If some more data is needed, just ask. thank you.

    events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn C:\Program Files\Microsoft VS Code\Code.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\Program Files\\Microsoft VS Code\\Code.exe',
  path: 'C:\\Program Files\\Microsoft VS Code\\Code.exe',
  spawnargs: [
    '--ms-enable-electron-run-as-node',
    '-e',
    "var p = process;p.on('message',function(m){if(m.c==='e'){p.exit(0);}else if(m.c==='rs'){try{var r=require.resolve(m.a);p.send({c:'r',s:true,r:r});}catch(err){p.send({c:'r',s:false});}}});",
    ''
  ]
}
[Error - 19:52:48] Connection to server got closed. Server will not be restarted.
oOHumen
  • 1
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Jose Lora Jan 15 '22 at 20:33

2 Answers2

0

For me it was related to globally installed jshint. In VSCode 'Settings'-'Parameters'-'Extensions'-'JSHint configuration' set the correct path to jshint modules in 'Node Path', for example in Windows it can be like c:\Users\User\AppData\Roaming\npm\node_modules\jshint\

shushu
  • 26
  • 3
0

i think turning the server on and off multiple times will cause this. When I program games with pygame I have run and turned off many programs, my computer is configured with 16GB ram and 512GB SSD, but the i5 chip is low. I solved this problem by restarting my computer. Then reopened it and fixed it

couz2200
  • 1
  • 1