ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
192 stars 150 forks source link

Error installing ibm_db@2.2.1 #608

Closed vamshikrishnanethi closed 4 years ago

vamshikrishnanethi commented 4 years ago

I am running an application which uses ibm_db 2.2.1 and all of sudden I started to get errors while running npm i. I have tried reinstalling, Node, NPM, Python and nothing seems to be working. PFB the error log. Any help is appreciated. Thanks!

System Properties

  1. Windows 10 - 64 Bit
  2. Node -- 8.11.1
  3. NPM - 5.6.0
  4. Python -- 2.7.17

Error Log

ibm_db@2.2.1 install C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db

node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip...

100.00% | 22570684 bytes downloaded out of 22570684 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...

C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\build\binding.sln]

{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=$IBM_DB_HOME" gyp ERR! cwd C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

killed: false, code: 1, signal: null, cmd: 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME' }

node-gyp build process failed! Proceeding with Pre-compiled Binary Installation.

The system cannot find the file specified. The system cannot find the file specified. The system cannot find the path specified. child_process.js:644 throw err; ^

Error: Command failed: rmdir /s /q C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\build The system cannot find the file specified. The system cannot find the file specified. The system cannot find the path specified.

at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at installPreCompiledWinBinary (C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\installer\driverInstall.js:463:21)
at C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\installer\driverInstall.js:283:21
at ChildProcess.exithandler (child_process.js:282:5)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

npm WARN @material-ui/core@3.9.3 requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/core@3.9.3 requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/icons@3.0.2 requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/icons@3.0.2 requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/lab@3.0.0-alpha.30 requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/lab@3.0.0-alpha.30 requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/system@3.0.0-alpha.2 requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/system@3.0.0-alpha.2 requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/utils@3.0.0-alpha.3 requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN @material-ui/utils@3.0.0-alpha.3 requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself. npm WARN react-data-components@1.2.0 requires a peer of react@^0.14.0 || ^15.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-dialog@1.0.2 requires a peer of react@^0.14.7 || ^15.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-event-listener@0.6.6 requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ibm_db@2.2.1 install: node installer/driverInstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ibm_db@2.2.1 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! C:\Users\ChanduMesala\AppData\Roaming\npm-cache_logs\2020-02-03T20_54_52_207Z-debug.log

bimalkjha commented 4 years ago

@vamshikrishnanethi Thanks for pasting the output of npm install ibm_db. By looking carefully on the output, we can see that below error is the root cause:

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\build\binding.sln]

Seems, .NET Framework has gone with some change in your system. Please rectify the .NET SDK issue and ibm_db installation issue should be fixed.

We would also recommend to use the latest version of ibm_db which is 2.6.3. Your current version is of 2.2.1 which is quite old. 2.6.3 has better performance and features over 2.2.1. Thanks.

bimalkjha commented 4 years ago

If you think its not a .NET framework issue, please try once with latest version of ibm_db and let us know the result. Thanks.

vamshikrishnanethi commented 4 years ago

hi @bimalkjha

I have installed the .NET Framework 2.0 SDK and as said trying to use ibm_db@2.6.3 but still having difficulties. Below is the complete error log.

ibm_db@2.6.3 install C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db node installer/driverInstall.js

platform = win32 , arch = x64 , node.js version = v8.11.1 Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip...

100.00% | 22570684 bytes downloaded out of 22570684 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...

C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\build\binding.sln]

{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=$IBM_DB_HOME" gyp ERR! cwd C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

killed: false, code: 1, signal: null, cmd: 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME' }

node-gyp build process failed!

Proceeding with Pre-compiled Binary Installation.

=================================== node-ibm_db installed successfully!

vamshikrishnanethi commented 4 years ago

I am getting the error as well as message at the bottom saying node-ibm_db installed successfully. Not sure if the module was installed properly.

vamshikrishnanethi commented 4 years ago

And this is what I get when trying to install ibm_db@2.2.1

ibm_db@2.2.1 install C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip...

100.00% | 22570684 bytes downloaded out of 22570684 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...

C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\build\binding.sln]

{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=$IBM_DB_HOME" gyp ERR! cwd C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

killed: false, code: 1, signal: null, cmd: 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME=$IBM_DB_HOME' }

node-gyp build process failed! Proceeding with Pre-compiled Binary Installation.

The system cannot find the file specified. The system cannot find the file specified. The system cannot find the path specified. child_process.js:644 throw err; ^

Error: Command failed: rmdir /s /q C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\build The system cannot find the file specified. The system cannot find the file specified. The system cannot find the path specified.

at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at installPreCompiledWinBinary (C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\installer\driverInstall.js:463:21)
at C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\installer\driverInstall.js:283:21
at ChildProcess.exithandler (child_process.js:282:5)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

npm WARN rollback Rolling back node-pre-gyp@0.14.0 failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\fsevents\node_modules' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ibm_db@2.2.1 install: node installer/driverInstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ibm_db@2.2.1 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! C:\Users\ChanduMesala\AppData\Roaming\npm-cache_logs\2020-02-04T19_07_31_506Z-debug.log

bimalkjha commented 4 years ago

@vamshikrishnanethi It seems path of msbuild is not set and ibm_db is picking up the msbuild.exe from wrong location.

gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1

Please check you have MSBuild folder under C:\Program Files (x86) and add C:\Program Files (x86)\MSBuild\14.0\Bin to system environment variable. It should fix the issue.

ibm_db comes with pre-compiled binary for windows platform based on different node.js version. If node-gyp fails due to any reason, ibm_db unzips the build.zip file and uses pre-compiled binary from it. So, if you get "node-ibm_db installed successfully!", means ibm_db is ready for use. In your latest post, we can not see this message but in previous post it is.

Error: Command failed: rmdir /s /q C:\Users\ChanduMesala\Desktop\INtroduction to portal\TIP-2.0\node_modules\ibm_db\build The system cannot find the file specified. The system cannot find the file specified. The system cannot find the path specified.

Above error message says that ibm_db installer is unable to find the build directory. This could be due to either build.zip does not exist or ibm_db is unable to unzip it. I am unable to reproduce this schenario as ibm_db is uploaded on npm with build.zip. Could you please investigate the reason and update us. Anyway, if you set correct path of msbuild.exe, node-gyp will succeed and ibm_db need not to check for build.zip. Thanks.

bimalkjha commented 4 years ago

I am getting the error as well as message at the bottom saying node-ibm_db installed successfully. Not sure if the module was installed properly.

As long as we get this success message, the module is installed properly despite error messages. Please ignore those error message. So, ibm_db@2.6.3 is working for you. After installation, you can execute command node test\test-basic-test.js. It should throw connection error. Means it is working. Thanks.

vamshikrishnanethi commented 4 years ago

Hello @bimalkjha

Thanks for the response but I am still having issues. None of my node js applications are working as expected with ibm_db@2.2.1 as its throwing me different errors for different applications at the time of installation.

For ibm_db@2.6.3, looks like its installing with errors but my application still fails when trying to establish a database connection and node test\test-basic-test.js gives me an error saying 'Cannot find module'.

Is there any chance to do a webex session so that we can pin point the issue. If so, this is my webex url https://ibm.webex.com/meet/vamshikn. I am from Connecticut, US (EST). Let me know which time works for you. Thanks!

bimalkjha commented 4 years ago

@vamshikrishnanethi I can attend the webex meeting. I work from Bangalore and my preferred time for webex session would be 12PM to 8PM IST. Please send me invitation for tomorrow. Thanks.

vamshikrishnanethi commented 4 years ago

Hello @bimalkjha

Lets do it tomorrow at 5:30 PM IST which would be 7:00 AM EST. Let me know your email id if you are looking for a formal invitation, if not below are my webex details.

https://ibm.webex.com/meet/vamshikn

Looking forward for the call. Thanks!

vamshikrishnanethi commented 4 years ago

Hello @bimalkjha ,

The issue has been resolved. Not sure what was the root cause but we did a system restore and started from scratch. Now everything is working as expected with ibm_db@2.6.3.

I will be cancelling our meeting for tomorrow and closing the issue. Thanks for your support!