Exploring Deno's standard library, I encountered an issue with Deno.run
- a function designed to create a new subprocess.
Here is the example provided in the documentation:
const p = Deno.run({
cmd: ["echo", "hello"],
});
When I attempt to run this code with the --allow-run
permission, I receive the following error message:
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 references a call to run
in js/ops/process.ts, which in turn calls sendSync
in dispatch_json.ts.
The stacktrace points to dispatch_json.ts line 72 as the source of the error. This line simply unwraps the JSON response received from line 67:
const resUi8 = core.dispatch(opId, argsUi8, zeroCopy);
.
I believe the core.dispatch
operation leads to an issue within isolate.rs line 358. Here is where my understanding becomes unclear.
TLDR: Beneath the surface of Deno, there is an error occurring:
The system cannot find the file specified. (os error 2)
when attempting to execute Deno.run({cmd: ["echo", "hello"]});
.