ibmdb / vscode-extension

vscode extenstion for db2 as db2connect
7 stars 2 forks source link

Command 'Db2: Connect' resulted in an error (command 'extension.Db2Connect' not found) #50

Closed gcmanriq closed 2 years ago

gcmanriq commented 2 years ago

Steps to Reproduce:

  1. Install extension
  2. Go to DB2 Connect and select Connect Option
  3. Db2Connect Output:
    
    Downloading and extraction of DB2 ODBC CLI Driver completed successfully ...

/Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/installer/clidriver Extraction of build.zip completed successfully...

Successfully renamed the Electron binary Error: dlopen(/Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node, 0x0001): Library not loaded: '/Users/bjha/nodework/clidriver/lib/libdb2.dylib' Referenced from: '/Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node' Reason: tried: '/Users/bjha/nodework/clidriver/lib/libdb2.dylib' (no such file), '/usr/lib/libdb2.dylib' (no such file)



Tried to unistall extension and restarted visual studio code several times and still the same issue.
Library is available under  /Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/installer/clidriver/lib/libdb2.dylib but I can't create symbolic link in /usr/lib
BjarniThor commented 2 years ago

Having the exact same problem, looking forward to hearing about a solution.

DB2Connect log Successfully renamed the Electron binary Error: dlopen(/Users/rb653/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node, 0x0001): Library not loaded: /Users/bjha/nodework/clidriver/lib/libdb2.dylib Referenced from: /Users/rb653/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node Reason: tried: '/Users/bjha/nodework/clidriver/lib/libdb2.dylib' (no such file), '/usr/lib/libdb2.dylib' (no such file)

bimalkjha commented 2 years ago

@BjarniThor @gcmanriq I have just pushed the fix of this issue. In your vscode, click on View -> Command Palette -> Db2: Rebuild Native Module and issue should get fixed. Please try and update. Thanks.

BjarniThor commented 2 years ago

Very well done, confirmed working for me! Thanks you.

gcmanriq commented 2 years ago

It is working, thanks!