I have a project that is hosted on hub.jazz.net. The project is running on nodeJS/express platform and uses an IBM DB2 database. After setting up the pipeline, depolyment fails on the test stage (running test on a ubuntu workstation produces no errors). This is the error I get on jazz:
/home/jenkins/workspace/fc58b251-8c7e-9b8e-62f7-e185761256f0/cad6a0e4-b405-486a-9e93-cdc998d8d569/node_modules/ibm_db/node_modules/bindings/bindings.js:79
throw e
^
Error: libxml2.so.2: cannot open shared object file: No such file or directory
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/home/jenkins/workspace/fc58b251-8c7e-9b8e-62f7-e185761256f0/cad6a0e4-b405-486a-9e93-cdc998d8d569/node_modules/ibm_db/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/home/jenkins/workspace/fc58b251-8c7e-9b8e-62f7-e185761256f0/cad6a0e4-b405-486a-9e93-cdc998d8d569/node_modules/ibm_db/lib/odbc.js:27:31)
Package.json specifies ibm_db version 0.0.15, and the node engine version is 0.12.1. How do I fix this?
Answer by JonasMBaravykas (26) | Jan 06, 2016 at 09:27 AM
Good day,
The driver issue was solved simply by inserting "sudo apt-get install -y libxml2-dev" command into Stage Configuration Command Window.
You might also want to add sudo apt-get update
if apt-get install fails to find the package.
Answer by LinusHelmestam (272) | Dec 01, 2015 at 03:24 AM
Hi,
Have you sorted out this problem? If not, one thing to try would be to check which node_modules you use locally and double check that package.json matches it. Also, if your build need a different node version than what is used on the build machine you can during build time install your preferred node version. Just do that in the stage configuration page in the "Build Shell Command" section of the build job.
Good luck :-)
problem using ibm_db on node.js 2 Answers
DevOps pipeline with nodejs and grunt problem 1 Answer
Is Node.js runtime working? 2 Answers