node.jsoracle-databaseapple-m1node-oracledb

Has anyone successful used oracledb with Mac M1


I have 2021 MacBook Pro M1 and I have nodes project where I am trying to use oracledb package and when I run I get the following error message:

Error: DPI-1047: Cannot locate a 64-bit Oracle Client library: "dlopen(/Users/.../mac_client/instantclient_19_8/libclntsh.dylib, 0x0001): tried: '/Users/.../mac_client/instantclient_19_8/libclntsh.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))". See https://oracle.github.io/node-oracledb/INSTALL.html for help

I have gone to the site and cannot find instructions on how to resolve my issue. I have also done several searches and have not found anything. I am just wondering if anyone in this community has run into this issue and how did you resolve it.

Any and all help is appreciated.


Solution

  • With node-oracledb 6.0 you no longer always need Oracle Instant Client - most apps will run without it. See the release announcement. A simple npm install oracledb should immediately lets your apps connect to Oracle Database.

    If you do want to use some additional Oracle Database features currently only supported in the non-default 'Thick' mode with Instant Client, you'll currently need to use an Intel Node.js binary. See How to Install node-oracledb 5.5 and Oracle Database on Apple M1/M2 Silicon.