Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Uncaught TypeError: os.machine is not a function, import * as os from 'node:os' #20915

Closed
lauer3912 opened this issue Oct 16, 2023 · 2 comments
Labels
bug Something isn't working correctly node compat

Comments

@lauer3912
Copy link

image

@lucacasonato lucacasonato added bug Something isn't working correctly node compat labels Oct 18, 2023
@MarybethGasman
Copy link
Contributor

We need a function in ext/node/polyfills/os.ts.

// ext/node/polyfills/os.ts
export function machine(): string {
  // call some rust/js code to get some system info
  return type;
}

To implement this, we might need to add an ops in runtime/ops/os/sys_info.rs,
or we already have some utils to do this in js

I'm unfamiliar with the Rust part of Deno and how to call Rust code within a JavaScript script in Deno.
I'm willing to work on this issue with some help.

@littledivy
Copy link
Member

Fixed by #21751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

No branches or pull requests

4 participants