Repository: oracle/node-oracledb

Issue #18: Precompiled node-oracle
Created: 2015-02-09T20:10:15Z
If you are having issues installing node-oracledb or if you don't have a build environment and are looking to install a pre-compiled version of node-oracledb then check out my new npm module oracledb-pb, which can be installed like so:
npm install oracledb-pb
Then, within your app, instead of:
var oracledb = require('oracledb');
use:
var oracledb = require('oracledb-pb');
oracledb-pb is an unofficial oracledb module which I have published to npm for the benefit of allowing the community to get up and running with oracledb quickly. It's only dependency is the Microsoft Visual C++ Runtime. The module even downloads and installs the necessary Oracle Instant Client Packages for you and adds the folder to your PATH environment variable.
oracledb-pb is based on the work outlined below and you could optionally follow the below instructions instead which outlines how to install oracledb directly from my fork instead. For small projects I recommend oracledb-pb but for anything large scale or something that you will be publishing to npm I don't recommend it. The main reason is because it is not officially supported by Oracle and another reason is because I can't make any guarantees as to how frequently or how long term I can maintain it.
Fork with a working setup here.
Install instructions:
The following instructions allows one to install oracledb (from my fork) without needing a build environment.
Requirements: One must have an environment for which a binary has been built for. The table below under the section "List of available binaries" contains the binaries that I have compiled thus far. The list is limited because an automated build system is not yet utilized and I am manually needing to create these for each environment.

Open command prompt and navigate to the folder where you would like to install oracledb.
Paste the following command: npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015
Before pressing enter, at the --toolset option, change the oci version and msvs version so they match your environment. For example, --toolset=oci12.1-msvs2015 means you have the 12.1 version of the Oracle Client library and 2015 version of Visual Studio's C++ Redistributable. UPDATE: actually I made a mistake. With OCI 12.1 it's the 2010 Redistribuatable that is needed not the 2015. I will be correcting this but in the meantime you will need to use ...msvs2015 option when installing while making sure you have the 2010 Redistributable installed. Sorry for the confusion.
Press Enter to run the command and once finished, if you scroll up, you should see the words "is installed via remote".
Once installed you must make sure the correct Oracle libraries are available in PATH. The version must match a version listed in the above table. Currently only 12.1 have prebuilts***

List of available binaries as of Jan 9th 2017



oracledb Version
Platform
Arch
Node ABI Version
OCI version
MS VS C++ Redist. Version
Install Command




1.12.2
Linux
64bit
51 (Node v7)
12.1
n/a
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1


1.12.2
Linux
64bit
48 (Node v6)
12.1
n/a
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1


1.12.2
Windows
64bit
51 (Node v7)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.12.2
Windows
64bit
48 (Node v6)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.11
Windows
64bit
48 (Node v6)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.11
Windows
64bit
46 (Node v4)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.11
Windows
64bit
14 (Node v0.12)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.10.1
Windows
64bit
48 (Node v6)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.10.1
Windows
32bit
48 (Node v6)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.10.1
Windows
64bit
46 (Node v4)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.10.1
Windows
32bit
46 (Node v4)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.10.1
Windows
32bit
14 (Node v0.12)
12.1
2015
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2015


1.10.1
Windows
32bit
14 (Node v0.12)
12.1
2012
npm install https://github.com/bchr02/node-oracledb#prebuild_support --toolset=oci12.1-msvs2012



Instructions to build and package can be found here: #392

Duplicate issue #21: Make installation easier
Created: 2015-02-13T11:04:18Z
hi,
i think the driver installation could be easier :
installing mysql driver is done using only one command : npm install mysql
for installing an oracle driver you should :

install instant client
install the sdk
set PATH
set some environment variables
solve compilation errors...

couldn't instant client include binary for node driver?
node driver can't try to detect default folder path if environment variables aren't set ?

Closing comment (2015-02-16T17:52:37Z): I'm going to close this issue. See
https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instrpm
https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#linuxadv
There are no plans to bundle Instant Client binaries.
New issues can be created for specific requirements, similar to #18