I am developing a React Native app (RN v0.64.3) and I'm trying to connect the debugger to it, but whenever I press 'Debug Remote JS', the app crashes with the following error:
In VSCode console:
...\AppName\node_modules\metro-hermes-compiler\src\emhermesc.js:81
throw ex;
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:19000/debugger-ui' ]
On Android (both emulator and my phone):