ibmdb / vscode-extension

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

Failed to Rebuild Native Modules #37

Closed PhilipMok-cc closed 2 years ago

PhilipMok-cc commented 3 years ago

Steps to Reproduce:

  1. block GitHub with firewall
  2. Install form market place
  3. command 'extension.DB2Connect' not found

Are there any offline installation package? or any step to linkup my db2 client and the vs code extension?

bimalkjha commented 2 years ago

@philip-mok We need github access to download the precompiled binary of native module and clidriver. If you block github, then you need to have Visual Studio and MSBuild.exe installed in the system so that you can compile the native code and get windows binary. For that follow below instructions:

  1. Install db2client or server or dsdriver or download vscode specific clidriver from link given here
  2. set IBM_DB_HOME system environment variable pointing to clidriver or dsdriver of sqllib directory which must have an include directory.
  3. Install Visual Studio and add location of MSBuild.exe in PATH system environment variable.
  4. cd to node_modules\ibm_db directory under db2connect extension.
  5. run npm install --vscode command under ibm_db directory and see for final success message.
  6. For more info, check the link : https://github.com/ibmdb/node-ibm_db/blob/master/INSTALL.md#-9-node-ibm_db-how-to-manually-build-on-windows Thanks.
bimalkjha commented 2 years ago

Check the node.js version in Help->About in your vscode and same version of node.js should be installed in your system. Thanks.

PhilipMok-cc commented 2 years ago

Many Thanks! Most of my college are data warehouse developer and has no knowledge on typescript. Could we manually download a stable compiled binay before we distribute it? we have the db2client installed.

bimalkjha commented 2 years ago

@PhilipMok-cc Yes, you can download stable compiled binary and distribute it. But, first you need to install it in a system with internet connection. Then you can copy the installed directory and distribute on other system having same version of vscode and node.js with similar install path. Thanks.