agarcia_me
agarcia_meโ€ข6mo ago

`arch` and `platform` are empty strings in `node:process`

๐Ÿ‘‹ hello! I'm trying to use a node project that uses arch and platform inside node:process, which works great in Node, but they appear to be empty strings in Deno.
import { arch, platform } from "node:process";
console.log(arch, platform);
import { arch, platform } from "node:process";
console.log(arch, platform);
$ node file.mjs
x64 darwin
$ deno run file.mjs
$ node file.mjs
x64 darwin
$ deno run file.mjs
Is this expected behavior? I know the Deno.build object also has this info, but I'm trying to keep it compatible with an external npm package. Thank you!
2 Replies
marvinh.
marvinh.โ€ข6mo ago
That sounds like a bug in Deno's node compatibility layer. Can you file an issue for that? https://github.com/denoland/deno/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=
agarcia_me
agarcia_meโ€ข6mo ago
GitHub
arch and platform are empty strings in node:process ยท Issue #...
Version: Deno 1.41.0 I'm trying to use the process.arch and process.platform from node:process. In node it works as expected, but in Deno they both return empty strings. import { arch, platform...