Install the node.js driver for SAP HANA in under a minute
The node.js driver for SAP HANA is now publicly available directly from the SAP npm registry at https://npm.sap.com, under an SAP developer license agreement. You can install it in two lines using the npm node.js package manager. This is a short blog post for a quick install.
To install the node.js driver for SAP HANA, for a specific project:
# Change to the project directory > cd {my project} # Set the registry for @sap modules (be sure to type https, not http) > npm config set @sap:registry https://npm.sap.com # Install the HANA client > npm install @sap/hana-client # List the installed modules > npm ls # To update to the latest version > npm update @sap/hana-client
To install the node.js driver for SAP HANA globally:
# Set the registry for @sap modules (be sure to type https, not http) > npm config --global set @sap:registry https://npm.sap.com # Install the HAN client > npm install --global @sap/hana-client # List the installed modules > npm ls --global # To update to the latest version > npm update --global @sap/hana-client
If you are behind a proxy server, set your http_proxy and https_proxy environment variables, as you would for installing other node.js modules.
The install is available for Windows (x64), Mac OS, Linux (x64), and Linux on Power PC (little endian). The driver will be updated periodically with patches.
And that’s it… enjoy.
Hi Tom,
thanks for this "announcement".
Could you outline the relation of this new SAP scoped package @sap/hana-client to the existing hdb package "SAP HANA Database Client for Node" (https://github.com/SAP/node-hdb) on public npm registry?
Currently other SAP scoped packages like @sap/xsjs or @sap/hdbext rely on the public hdb npm module. Will this change?
The README of this package is very short. Is there any better documentation available?
Thanks in advance, HP
Hi Tom,
Yes the steps are easy.
Thanks
Dilip
Hi,
We don't have npm installed in our OS system. How can we use it in our WebIDE project.
Any suggesstions?
Thank You.
Regards,
Ajinkya.
Hi Ajinkya: if you are using WebIDE with a node.js buildpack, you will already have this driver present without taking any action. WebIDE provides an API above the driver itself that you will be using in development (I can't recall the module name right now).
Hi Tom,
Can you also let us know how to install the .Net driver for SAP HANA? I am currently facing issue with installation of the same when I push my app to Cloud foundry.
Cheers,
Akhilesh
Hi Akhilesh,
If you are talking about Cloud Foundry (CF) then I guess you would need a Linux version of a .NET Core driver for HANA. Unfortunately that is not available yet. It is likely to be available in SPS05. If your customer has a Testing license then they may be able to get one earlier.
I am not a CF expert. If you mean .NET driver (Windows) then maybe you can tell me more? Or ask a question at https://answers.sap.com/index.html, using the SAP HANA tag.
Dear colleagues,
I want to create a Docker image of ubuntu:bionic with node and the hana libraries.
Indeed, when I check in the distribution, there is a.
however not the required
linuxppc64-gcc48
can someone be of help ? Thankyou