Skip to content

How to install on Apple Silicon / M1 Chip? #784

Closed

Description

@christo-ph

I am unable to get ibm_db to work on Apples M1 Chip, as the installer is complaining about:

platform =  darwin , arch =  arm64 , node.js version =  v16.5.0
make version = GNU Make 3.81
Mac OS 32 bit not supported. Please use an x64 architecture.

How can I get this to work?

Activity

  1. bimalkjha commented on Jul 25, 2021

    @bimalkjha
    Member

    @christo-ph The arm64 platform is not supported, hence the error. You need an x64 architecture chip to install it. Actually, IBM ODBC driver is not supported on arm64 chip for Macbook which is used by ibm_db internally for connectivity.

    I do not have access to any Apple system with M1 chip, so I can not verify ibm_db, but you can give a try by following below steps:

    1. Download https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz and 
    untar it. You'll get clidriver directory.
    2. export IBM_DB_HOME=full/path/of/clidriver
    3. git clone https://github.com/ibmdb/node-ibm_db.git
    4. cd node-ibm_db
    5. npm install
    

    If there is no error by npm install command, update the database connection string in ibm_db\test\config.testConnectionStrings.json file and save it. Then run node test\test-basic-test.js to verify the connectivity.

    If it do not work, you can share the complete output of npm install and node test-basic-test.js commands to look further.
    Thanks.

  2. christo-ph commented on Jul 25, 2021

    @christo-ph
    Author

    Hi @bimalkjha

    $ npm install                                                                                                                                                           So 25 Jul 20:41:59 2021
    npm WARN old lockfile
    npm WARN old lockfile The package-lock.json file was created with an old version of npm,
    npm WARN old lockfile so supplemental metadata must be fetched from the registry.
    npm WARN old lockfile
    npm WARN old lockfile This is a one-time fix-up, please be patient...
    npm WARN old lockfile
    
    > [email protected] install
    > node installer/driverInstall.js
    
    platform = darwin, arch = arm64, node.js version = v16.5.0
    make version =GNU Make 3.81
    IBM_DB_HOME environment variable have already set to -> /Users/xxx/coding/clidriver
    
    Downloading of clidriver skipped - build is in progress...
    
    
    added 63 packages, and audited 64 packages in 2s
    
    1 package is looking for funding
      run `npm fund` for details
    
    found 0 vulnerabilities
    $ node test/test-basic-test.js                                                                                                                                 2190ms  So 25 Jul 20:42:05 2021
    /Users/xxx/coding/node-ibm_db/node_modules/bindings/bindings.js:135
      throw err;
      ^
    
    Error: Could not locate the bindings file. Tried:
     → /Users/xxx/coding/node-ibm_db/build/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/build/Debug/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/build/Release/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/out/Debug/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/Debug/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/out/Release/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/Release/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/build/default/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/compiled/16.5.0/darwin/arm64/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/addon-build/release/install-root/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/addon-build/debug/install-root/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/addon-build/default/install-root/odbc_bindings.node
     → /Users/xxx/coding/node-ibm_db/lib/binding/node-v93-darwin-arm64/odbc_bindings.node
        at bindings (/Users/xxx/coding/node-ibm_db/node_modules/bindings/bindings.js:126:9)
        at Object.<anonymous> (/Users/xxx/coding/node-ibm_db/lib/odbc.js:57:31)
        at Module._compile (node:internal/modules/cjs/loader:1095:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
        at Module.load (node:internal/modules/cjs/loader:975:32)
        at Function.Module._load (node:internal/modules/cjs/loader:816:12)
        at Module.require (node:internal/modules/cjs/loader:999:19)
        at require (node:internal/modules/cjs/helpers:93:18)
        at Object.<anonymous> (/Users/xxx/coding/node-ibm_db/test/common.js:1:12)
        at Module._compile (node:internal/modules/cjs/loader:1095:14) {
      tries: [
        '/Users/xxx/coding/node-ibm_db/build/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/build/Debug/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/build/Release/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/out/Debug/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/Debug/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/out/Release/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/Release/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/build/default/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/compiled/16.5.0/darwin/arm64/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/addon-build/release/install-root/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/addon-build/debug/install-root/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/addon-build/default/install-root/odbc_bindings.node',
        '/Users/xxx/coding/node-ibm_db/lib/binding/node-v93-darwin-arm64/odbc_bindings.node'
      ]
    }
  3. bimalkjha commented on Jul 25, 2021

    @bimalkjha
    Member

    @christo-ph Open file ibm_db\installer\driverInstall.js and remove check for x64 arch from line number 186. i.e.
    change (platform == 'darwin' && arch == 'x64')) to (platform == 'darwin')) and save the file. Then try from step 5 i.e. npm install and check. Thanks.

  4. christo-ph commented on Jul 25, 2021

    @christo-ph
    Author

    In addition to line 186 I had to change line 229 to

    if(arch == 'x64' || arch == 'arm64') {
    

    that the compile step started.

    Output:

     npm install                                                                                                                                                    1.2m  So 25 Jul 20:59:17 2021
    
    > [email protected] install
    > node installer/driverInstall.js
    
    platform = darwin, arch = arm64, node.js version = v16.5.0
    make version =GNU Make 3.81
    
    ****************************************
    You are downloading a package which includes the Node.js module for IBM DB2/Informix.  The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the node module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in /Users/xxx/coding/node-ibm_db/installer/clidriver. Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device.
    ****************************************
    
    Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz ...
    
    100.00% | 30120620 bytes downloaded out of 30120620 bytes.
    
    Downloading and extraction of DB2 ODBC CLI Driver completed successfully.
    
      CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
    
    Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"
    gyp info it worked if it ends with ok
    gyp info using [email protected]
    gyp info using [email protected] | darwin | arm64
    gyp info find Python using Python version 3.9.6 found at "/opt/homebrew/opt/[email protected]/bin/python3.9"
    (node:99041) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
    (Use `node --trace-deprecation ...` to show where the warning was created)
    gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9
    gyp info spawn args [
    gyp info spawn args   '/Users/xxx/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    gyp info spawn args   'binding.gyp',
    gyp info spawn args   '-f',
    gyp info spawn args   'make',
    gyp info spawn args   '-I',
    gyp info spawn args   '/Users/xxx/coding/node-ibm_db/build/config.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/Users/xxx/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/Users/xxx/Library/Caches/node-gyp/16.5.0/include/node/common.gypi',
    gyp info spawn args   '-Dlibrary=shared_library',
    gyp info spawn args   '-Dvisibility=default',
    gyp info spawn args   '-Dnode_root_dir=/Users/xxx/Library/Caches/node-gyp/16.5.0',
    gyp info spawn args   '-Dnode_gyp_dir=/Users/xxx/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=/Users/xxx/Library/Caches/node-gyp/16.5.0/<(target_arch)/node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/Users/xxx/coding/node-ibm_db',
    gyp info spawn args   '-Dnode_engine=v8',
    gyp info spawn args   '--depth=.',
    gyp info spawn args   '--no-parallel',
    gyp info spawn args   '--generator-output',
    gyp info spawn args   'build',
    gyp info spawn args   '-Goutput_dir=.'
    gyp info spawn args ]
    gyp info spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    In file included from ../src/odbc.cpp:29:
    In file included from ../src/odbc.h:23:
    In file included from ../node_modules/nan/nan.h:2884:
    ../node_modules/nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
          data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                              ^
    /Users/xxx/Library/Caches/node-gyp/16.5.0/include/node/v8.h:5590:3: note: 'GetContents' has been explicitly marked deprecated here
      V8_DEPRECATED("Use GetBackingStore. See http://crbug.com/v8/9908.")
      ^
    /Users/xxx/Library/Caches/node-gyp/16.5.0/include/node/v8config.h:415:35: note: expanded from macro 'V8_DEPRECATED'
    # define V8_DEPRECATED(message) [[deprecated(message)]]
                                      ^
    In file included from ../src/odbc.cpp:29:
    ../src/odbc.h:27:10: fatal error: 'sqlcli1.h' file not found
    #include <sqlcli1.h>
             ^~~~~~~~~~~
    1 warning and 1 error generated.
    make: *** [Release/obj.target/odbc_bindings/src/odbc.o] Error 1
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/Users/xxx/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
    gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
    gyp ERR! System Darwin 20.5.0
    gyp ERR! command "/Users/xxx/.nvm/versions/node/v16.5.0/bin/node" "/Users/xxx/.nvm/versions/node/v16.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=/Users/xxx/coding/node-ibm_db/installer/clidriver"
    gyp ERR! cwd /Users/xxx/coding/node-ibm_db
    gyp ERR! node -v v16.5.0
    gyp ERR! node-gyp -v v7.1.2
    gyp ERR! not ok
    
        at ChildProcess.exithandler (node:child_process:397:12)
        at ChildProcess.emit (node:events:394:28)
        at maybeClose (node:internal/child_process:1067:16)
        at Socket.<anonymous> (node:internal/child_process:453:11)
        at Socket.emit (node:events:394:28)
        at Pipe.<anonymous> (node:net:672:12) {
      killed: false,
      code: 1,
      signal: null,
      cmd: 'node-gyp configure build  --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"'
    }
    npm ERR! code 1
    npm ERR! path /Users/xxx/coding/node-ibm_db
    npm ERR! command failed
    npm ERR! command sh -c node installer/driverInstall.js
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/xxx/.npm/_logs/2021-07-25T18_59_37_543Z-debug.log
    
    

    (was a new shell, without IBM HOME. Therefore the download.

  5. bimalkjha commented on Jul 26, 2021

    @bimalkjha
    Member

    @christo-ph Now python3 is causing the issue. Node-gyp need python2 to work.
    Install python 2.7.x and set npm config set python python2.7, then try npm install. Thanks.

  6. christo-ph commented on Jul 26, 2021

    @christo-ph
    Author

    Actually, I get the same deprecated message as before.

  7. bimalkjha commented on Jul 27, 2021

    @bimalkjha
    Member

    @christo-ph After checking the output of your npm install, I see below error which looks the root cause:

    In file included from ../src/odbc.cpp:29:
    ../src/odbc.h:27:10: fatal error: 'sqlcli1.h' file not found
    #include <sqlcli1.h>
             ^~~~~~~~~~~
    1 warning and 1 error generated.
    make: *** [Release/obj.target/odbc_bindings/src/odbc.o] Error 1
    gyp ERR! build error
    

    Need to set some environment variable to get this file. Better is to source file ibm_db\installer\setenv.sh and then run npm install. Thanks.

  8. bimalkjha commented on Jul 29, 2021

    @bimalkjha
    Member

    @christo-ph Let me know if you are able to progress by sourcing setenv.sh file. Otherwise try below commands, it should work:

    export PATH=/Users/xxx/coding/node-ibm_db/installer/clidriver/bin:/Users/xxx/coding/node-ibm_db/installer/clidriver/lib:$PATH
    export DYLD_LIBRARY_PATH=/Users/xxx/coding/node-ibm_db/installer/clidriver/lib:$DYLD_LIBRARY_PATH
    export INCLUDE=/Users/xxx/coding/node-ibm_db/installer/clidriver/include:$INCLUDE
    cd /Users/xxx/coding/node-ibm_db
    npm install
    

    Thanks.

  9. smontoya24 commented on Aug 5, 2021

    @smontoya24

    @christo-ph Have you been able to found a solution for this ? I recently changed to an Apple Computer with Apple Silicon, I was starting to change and test some projects and I encountered this same problem. @bimalkjha Do you know if there is any information about a possible version for Apple Silicon of the drivers ?

  10. bimalkjha commented on Aug 6, 2021

    @bimalkjha
    Member

    @smontoya24 Download https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz and
    untar it. You'll get clidriver directory. Now, run below commands from terminal and share the output. Based on the result of below commands, we can suggest the next step:

    cd clidriver
    export PATH=`pwd`\bin:`pwd`:lib:$PATH
    export DYLD_LIBRARY_PATH=`pwd`\lib:$DYLD_LIBRARY_PATH
    cd bin
    db2level
    db2cli validate
    

    Thanks.

  11. smontoya24 commented on Aug 6, 2021

    @smontoya24

    @bimalkjha this is what I got in response of the commands.

    db2level

    db2level

    db2cli validate

    db2cli

    After that I tried to run my node project, but I still have the same error

    Error: Could not locate the bindings file.

  12. bimalkjha commented on Aug 6, 2021

    @bimalkjha
    Member

    @smontoya24 It looks good and I think it worked for @christo-ph. So, now follow below steps:

    1. export INCLUDE=<full_path_of_clidriver>\include:$INCLUDE
    2. export IBM_DB_HOME=<full_path_of_clidriver>
    3. git clone https://github.com/ibmdb/node-ibm_db.git
    4. cd node-ibm_db
    5. npm install
    

    If there is no error by npm install command, update the database connection string in ibm_db\test\config.testConnectionStrings.json file and save it. Then run node test\test-basic-test.js to verify the connectivity.

    If it do not work, you can share the complete output of npm install and node test-basic-test.js commands to look further.
    Thanks.

  13. bimalkjha commented on Aug 8, 2021

    @bimalkjha
    Member

    @christo-ph @smontoya24 I have delivered the code changes to support installation on Apple Silicon. You can install ibm_db using command npm install git+https://[email protected]/ibmdb/node-ibm_db.git to verify it. After next release, you can install using npm install ibm_db command.
    Please install using command npm install git+https://[email protected]/ibmdb/node-ibm_db.git and confirm here. Thanks.

  14. self-assigned this
    on Aug 8, 2021
  15. GuptaMegha commented on Aug 17, 2021

    @GuptaMegha

    @bimalkjha I am able to install ibm_db using npm install git+https://[email protected]/ibmdb/node-ibm_db.git. Thanks !
    But I am getting below error while using it:
    dyld: lazy symbol binding failed: Symbol not found: _SQLAllocHandle
    Referenced from: /Users/megupt/Projects/ecom-e2e-test/node_modules/ibm_db/build/Release/odbc_bindings.node
    Expected in: flat namespace

  16. bimalkjha commented on Aug 22, 2021

    @bimalkjha
    Member

    @GuptaMegha Please share the complete output of below commands:

    otool -L /Users/megupt/Projects/ecom-e2e-test/node_modules/ibm_db/build/Release/odbc_bindings.node
    otool -L /Users/megupt/Projects/ecom-e2e-test/node_modules/ibm_db/installer/clidriver/lib/libdb2.dylib
    cd ibm_db/installer
    source setenv.sh
    db2level
    db2cli validate -database "<dbname>:<hostname>:<port>" -connect -user <dbuser> -passwd <dbpass>
    

    Update database connection info in above db2cli validate command. You can update connection info in ibm_db\installer\testODBCConnection.sh script too and share the complete output of script testODBCConnection.sh.
    Thanks.

  17. added a commit that references this issue on Sep 12, 2021
  18. bimalkjha commented on Sep 13, 2021

    @bimalkjha
    Member

    @christo-ph @smontoya24 @GuptaMegha [email protected] is released with support for MacOS M1 Chip system. Please have fresh installation of latest version of ibm_db and share the result. Thank you!

  19. cuauhfer commented on Nov 8, 2021

    @cuauhfer

    @GuptaMegha did you solve the error? I'm currently getting the same output:

    dyld: lazy symbol binding failed: Symbol not found: _SQLAllocHandle
      Referenced from: /Users/cuauhfer/Documents/project/node_modules/ibm_db/build/Release/odbc_bindings.node
      Expected in: flat namespace
    

    I already tried reinstalling node, all my dependencies and xcode tools, but the same error persists.

    ibm_db version: 2.8.0
    SO: MacOS Big Sur 11.6
    Chip: Apple M1

  20. bimalkjha commented on Nov 10, 2021

    @bimalkjha
    Member

    @cuauhfer Please share the complete output of npm install ibm_db command. Such problem comes due to installation issue. Thanks.

  21. cuauhfer commented on Nov 10, 2021

    @cuauhfer

    My npm install output:

    % npm install [email protected]
    > node installer/driverInstall.js
    
    platform = darwin, arch = arm64, node.js version = v14.18.1
    make version =GNU Make 3.81
    
    ****************************************
    You are downloading a package which includes the Node.js module for IBM DB2/Informix.  The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the node module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in /Users/user/Documents/Proyectos/db2/node_modules/ibm_db/installer/clidriver. Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device.
    ****************************************
    
    Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz ...
    
    100.00% | 30120620 bytes downloaded out of 30120620 bytes.
    
    Downloading and extraction of DB2 ODBC CLI Driver completed successfully.
    
      CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
      CXX(target) Release/obj.target/odbc_bindings/src/odbc_connection.o
      CXX(target) Release/obj.target/odbc_bindings/src/odbc_statement.o
      CXX(target) Release/obj.target/odbc_bindings/src/odbc_result.o
      SOLINK_MODULE(target) Release/odbc_bindings.node
    
    ibm_db installed successfully.
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN [email protected] No repository field.
    
    + [email protected]
    added 59 packages from 45 contributors and audited 59 packages in 19.792s
    
    3 packages are looking for funding
      run `npm fund` for details
    
    found 0 vulnerabilities
    

    And my node index.js output:

    % node index.js
    node-ibm_db logs enabled.
    dyld: lazy symbol binding failed: Symbol not found: _SQLAllocHandle
      Referenced from: /Users/user/Documents/Proyectos/db2/node_modules/ibm_db/build/Release/odbc_bindings.node
      Expected in: flat namespace
    
    dyld: Symbol not found: _SQLAllocHandle
      Referenced from: /Users/user/Documents/Proyectos/db2/node_modules/ibm_db/build/Release/odbc_bindings.node
      Expected in: flat namespace
    
    [1]    28142 abort      node index.js
    
  22. mdgozza commented on Feb 16, 2022

    @mdgozza

    Anyone who is still looking for help - feel free to try:

    While we wait for ibm to officially support the new Apple arm chip, you can try to run the npm modules under Apple's Rosetta for cross compatibility ( although it will be a bit slower )
    Simply asking npm to install with this in mind you need to run npm install --target_arch=x64

    Alternatively, you can run your application in a docker container and ask docker to emulate it for you. ( also slower )
    https://docs.docker.com/desktop/mac/apple-silicon/

    by passing the --platform flag to the run command and setting it's value to linux/x86_64

    Originally posted by @mdgozza in #819 (comment)

  23. batbrain9392 commented on Jun 23, 2023

    @batbrain9392

    ibm_db is an optional dep from @sequelize/core@7, thus during npm ci, we faced the same issue in M1 Macs (arm64).
    I ended up running just the first 2 steps from a previous comment (mentioned below) and npm ci ran fine, as shown below:

    1. Download https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz and 
    untar it. You'll get clidriver directory.
    2. export IBM_DB_HOME=full/path/of/clidriver
    

    However, in the official doc, there's instruction to install an intel version of python & node. However, we already have python & node in the M1 Mac.
    Also, intel version of node didn't work when I ran a node command after the installation.

    @christo-ph The arm64 platform is not supported, hence the error. You need an x64 architecture chip to install it. Actually, IBM ODBC driver is not supported on arm64 chip for Macbook which is used by ibm_db internally for connectivity.

    I do not have access to any Apple system with M1 chip, so I can not verify ibm_db, but you can give a try by following below steps:

    1. Download https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz and 
    untar it. You'll get clidriver directory.
    2. export IBM_DB_HOME=full/path/of/clidriver
    3. git clone https://github.com/ibmdb/node-ibm_db.git
    4. cd node-ibm_db
    5. npm install
    

    If there is no error by npm install command, update the database connection string in ibm_db\test\config.testConnectionStrings.json file and save it. Then run node test\test-basic-test.js to verify the connectivity.

    If it do not work, you can share the complete output of npm install and node test-basic-test.js commands to look further. Thanks.

  24. bimalkjha commented on Jun 26, 2023

    @bimalkjha
    Member

    @batbrain9392 Follow the instructions as documented here. If still you face problem, open a new issue with all the information as requested in issue template. Thanks.

  25. locked as resolved and limited conversation to collaborators on Jun 26, 2023
  26. bimalkjha commented on Dec 11, 2024

    @bimalkjha
    Member

    @christo-ph @GuptaMegha @batbrain9392 @smontoya24 @mdgozza @cuauhfer [email protected] has been released with native installation support for MacOS M1 Chip system with clidriver of version 12.1.0. You may install it and check. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions