Tibbs
Tibbs5mo ago

Deno loading NPM module oracledb .node files with incorrect architecture

Hi team, I'm working to get Deno using the oracledb NPM module locally, v6.5.1 (latest), and when initializing the library in "thick client mode", the module loader is incorrectly trying to load in the arm64 *.node files locally instead of the darwin-x86.node version, even though my terminal is configured to run in x86 mode with "env /usr/bin/arch -x86_64 /bin/zsh --login" which is how I got it working in NodeJS. NodeJS correctly pulls in the darwin-x86.node version, but I don't see any way to run Deno in x86-64 mode, even though my terminal is in that mode. Any ideas? Thanks!
No description
4 Replies
Tibbs
TibbsOP5mo ago
No description
Deno AI Helper
Deno AI Helper5mo ago
I apologize, but I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it seems like there might be an issue with the architecture detection when loading the oracledb NPM module in Deno. Deno does not have a built-in mechanism to switch architectures like Node.js does. Deno is designed to run as a single executable, and the architecture it runs on is determined by the executable itself. If you're running Deno on an arm64 architecture, it will run as an arm64 process unless you're using some form of emulation or compatibility layer for x86-64. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. Since Deno does not natively support NPM modules, you might be using a third-party tool or workaround to import the oracledb module, which could be causing the issue. You may need to look into how the module is being imported and if there's a way to specify the architecture manually or use a different approach for compatibility. If you continue to experience issues, I recommend reaching out to the Deno community or the maintainers of the tool or workaround you're using for importing NPM modules for further assistance.
marvinh.
marvinh.5mo ago
@Tibbs this looks like a bug to me. Can you file an issue for that? That was the CLI team can look into this
Tibbs
TibbsOP5mo ago
Thanks @marvinh. , issue submitted: https://github.com/denoland/deno/issues/24395
GitHub
Deno loading .node files with incorrect architecture when using NPM...
Version: Deno 1.44.4 Copied from https://discord.com/channels/684898665143206084/1257181475418144899 M1 Mac, arm64 processor, terminal set to i386 mode with "env /usr/bin/arch -x86_64 /bin/zsh...