ibmdb / vscode-extension

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

Commands are not working. How to proceed? #17

Closed lucasmm96 closed 4 years ago

lucasmm96 commented 4 years ago

I can't execute any command. I tried to start rebuilding the modules but I got this error below, I don't know how to proceed.

Steps to Reproduce:

  1. Perform command to rebuild native modules
[6/2/2020 6:11:04 PM] Proceeding to rebuild native modules
[6/2/2020 6:11:04 PM] Cleaning up the current ibm_db
Running npm install,ibm_db in /Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0...

> ibm_db@2.6.4 install /Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db
> node installer/driverInstall.js
platform =  darwin , arch =  x64 , node.js version =  v10.16.3
make version = GNU Make 3.81

Proceeding to build IBM_DB for Electron framework...
Unable to detect VSCode version, will use Electron version  7.1.11

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...

0.03% | 8192 bytes downloaded out of 25982083 bytes.

99.98% | 25976832 bytes downloaded out of 25982083 bytes.

100.00% | 25982083 bytes downloaded out of 25982083 bytes.

****************************************
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 undefined   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 and extraction of DB2 ODBC CLI Driver completed successfully ...

{ Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --target=7.1.11 --arch=x64 --dist-url=https://atom.io/download/electron --IBM_DB_HOME="$IBM_DB_HOME"
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--target=7.1.11" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--IBM_DB_HOME=/Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db/installer/clidriver"
gyp ERR! cwd /Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:606:12)
  killed: false,
  code: 1,
  signal: null,
  cmd:
   'node-gyp configure build  --IS_DOWNLOADED=true --target=7.1.11 --arch=x64 --dist-url=https://atom.io/download/electron --IBM_DB_HOME="$IBM_DB_HOME"' }
npm
 WARN Db2connect@1.1.0 No repository field.
npm WARN Db2connect@1.1.0 No license field.

npm
 ERR! code ELIFECYCLE
npm

ERR! errno
 1
npm
 ERR!
 ibm_db@2.6.4 install: `node installer/driverInstall.js`
npm
 ERR! Exit status 1
npm
 ERR!

npm
 ERR!
 Failed at the ibm_db@2.6.4 install script.
npm
 ERR!
 This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lucasmm/.npm/_logs/2020-06-02T21_11_27_475Z-debug.log
[6/2/2020 6:11:27 PM] ibm_db installation failed with code: 1
Error: Failed to execute command "npm" with  arguments "install, ibm_db" return code 1
akhilravuri1 commented 4 years ago

Hi @LucasMartinsMenezes

From your logs, I see you have installed node.js 10.16.3 but vscode requires node 12.8.1 so please install the latest version.

Can you please provide the mac version? Like 10.14 or 10.15

Thanks, Akhil

lucasmm96 commented 4 years ago

Hi, I've installed node. But I'm still with the same issue 😐 . My Mac version is 10.15

node -v; npm -v
v14.4.0
6.14.5
[6/8/2020 7:11:18 PM] Proceeding to rebuild native modules
[6/8/2020 7:11:18 PM] Cleaning up the current ibm_db
Running npm install,ibm_db in /Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0...

> ibm_db@2.7.0 install /Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db
> node installer/driverInstall.js
platform =  darwin , arch =  x64 , node.js version =  v12.18.0
make version = GNU Make 3.81

Proceeding to build IBM_DB for Electron framework...
Unable to detect VSCode version, will use Electron version  7.2.4
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...

0.03% | 8192 bytes downloaded out of 25982083 bytes.

99.98% | 25976832 bytes downloaded out of 25982083 bytes.

100.00% | 25982083 bytes downloaded out of 25982083 bytes.

****************************************
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 undefined   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 and extraction of DB2 ODBC CLI Driver completed successfully ...

Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --target=7.2.4 --arch=x64 --dist-url=https://atom.io/download/electron --IBM_DB_HOME="$IBM_DB_HOME"
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--target=7.2.4" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--IBM_DB_HOME=/Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db/installer/clidriver"
gyp ERR! cwd /Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db
gyp ERR! node -v v12.18.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:315:20)
    at Pipe.<anonymous> (net.js:674:12) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'node-gyp configure build  --IS_DOWNLOADED=true --target=7.2.4 --arch=x64 --dist-url=https://atom.io/download/electron --IBM_DB_HOME="$IBM_DB_HOME"'
}
npm
 WARN Db2connect@1.1.0 No repository field.
npm WARN Db2connect@1.1.0 No license field.
npm 
ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ibm_db@2.7.0 install: `node installer/driverInstall.js`
npm
 ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ibm_db@2.7.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lucasmm/.npm/_logs/2020-06-08T22_11_41_226Z-debug.log
[6/8/2020 7:11:41 PM] ibm_db installation failed with code: 1
Error: Failed to execute command "npm" with  arguments "install, ibm_db" return code 1
Captura de Tela 2020-06-08 às 19 13 41
bimalkjha commented 4 years ago

@LucasMartinsMenezes If we carefully look the shared output logs, we can see the root cause of error as below:

Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --target=7.2.4 --arch=x64 --dist-url=https://atom.io/download/electron --IBM_DB_HOME="$IBM_DB_HOME"
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1

Xcode is required for db2connect vscode extension on macos. Please install Xcode and then rebuild the native module. Thanks.

lucasmm96 commented 4 years ago

I've installed Xcode:

image

But I still see the same error...

Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --target=7.2.4 --arch=x64 --dist-url=https://atom.io/download/electron --IBM_DB_HOME="$IBM_DB_HOME"
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--target=7.2.4" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--IBM_DB_HOME=/Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db/installer/clidriver"
gyp ERR! cwd /Users/lucasmm/.vscode/extensions/ibm.db2connect-1.1.0/node_modules/ibm_db
gyp ERR! node -v v12.18.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:315:20)
    at Pipe.<anonymous> (net.js:674:12) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'node-gyp configure build  --IS_DOWNLOADED=true --target=7.2.4 --arch=x64 --dist-url=https://atom.io/download/electron --IBM_DB_HOME="$IBM_DB_HOME"'
}
npm

WARN
 Db2connect@1.1.0 No repository field.
npm
 WARN
 Db2connect@1.1.0 No license field.

npm
 ERR! code ELIFECYCLE
npm 
ERR! errno 1
npm ERR! ibm_db@2.7.0 install: `node installer/driverInstall.js`
npm
 ERR! Exit status 1
npm ERR! 
npm 
ERR! Failed at the ibm_db@2.7.0 install script.
npm ERR!
 This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!
     /Users/lucasmm/.npm/_logs/2020-06-09T22_14_15_816Z-debug.log
[6/9/2020 7:14:15 PM] ibm_db installation failed with code: 1
Error: Failed to execute command "npm" with  arguments "install, ibm_db" return code 1
bimalkjha commented 4 years ago

@LucasMartinsMenezes This error comes if node-gyp package is unable to find output of command xcodebuild -version. We can see the code in file /usr/local/lib/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py near line number 1267. Please share the output of which xcodebuild and xcodebuild -version commands from your system. If unable to get xcodebuild -version after installation of Xcode, then you may need to add the location of xcodebuild in PATH system environment variable. Please check this blogpost to fix the similar xcode issue: https://aiki-developer.com/blog/os-catalina-git-issue Thanks.

akhilravuri1 commented 4 years ago

closing this as the user did not respond.