Trying out Deno's standard library, I ran into a problem with Deno.run - a function to spawn a new subprocess.
This example is provided in the documentation:
const p = Deno.run({
cmd: ["echo", "hello"],
});
Running this using the --allow-run permission, I get the following error:
error: Uncaught NotFound: The system cannot find the file specified. (os error 2)
at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
at Object.sendSync ($deno$/ops/dispatch_json.ts:72:10)
at Object.run ($deno$/ops/process.ts:41:10)
at Object.run ($deno$/process.ts:118:15)
at file:///C:/Users/.../gitgraph-deno/gitgraph.ts:1:16
js/process.ts:118:15 is a call to run in js/ops/process.ts, which itself calls sendSync in dispatch_json.ts.
The stacktrace says the error originates from dispatch_json.ts line 72. This just unwraps the JSON response received in line 67: const resUi8 = core.dispatch(opId, argsUi8, zeroCopy);.
I think the core.dispatch goes all the way to isolate.rs line 358. That's where I get lost.
TLDR: Somewhere under the hood of Deno this error occurs: The system cannot find the file specified. (os error 2) when I try to Deno.run({cmd: ["echo", "hello"]});.