Friday, January 8, 2016

npm install oracledb

npm install oracledb

Trying to install oracle node.js driver requires some effort. Since most of the github conversation on this issues are locked, i will describe it here, may be someone benefit.

My Environment

Windows 10 - 64 bit
Node.js 5.4.0 - 64 bit
Dot net framework 4.x
Visual Studio Community Edition 14
Oracle Xpress 11g 64 bit


Make sure all of your environment is either 64 bit or 32 bit, do not mix.


Prerequisites for oracledb

1- Python 2.7+
2- Dot net framework
3- Visual Studio C/C++ compiler

In win start menu type dev and open vs dev command prompt.
>cd "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
>vcvarsall amd64

--This will switch to vs 64 bit compiler

--set following local env variables. Since i have oracle xpress locally installed:

>set OCI_LIB_DIR=C:\oraclexe\app\oracle\product\11.2.0\server\oci\lib\MSVC
>set OCI_INC_DIR=C:\oraclexe\app\oracle\product\11.2.0\server\oci\include

>cd back-to-node-project-dir
>npm install oracledb

It should work!



No comments: