D
Deno

help

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

Aagarcia_me2/22/2024
๐Ÿ‘‹ 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!
Mmarvinh.2/22/2024
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=
Aagarcia_me2/22/2024
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...

Looking for more? Join the community!