Node.js's development at its zenith, Oracle as an established database although very large, we do not want to use, but the project needs, often and must be used. What the hell. Oracle has developed a corresponding library, https://github.com/oracle/node-oracledb/, this article describes the specific installation methods, part of the translation of their documents, combined with some personal experience.
The specific method can refer to this: http://my.oschina.net/airmount/blog/277669
-------------------------------------------------------------------------------What I want to say is the precautions in the installation process.
64-bit and 32-bit attentionOracle Instant Client is a C + + interface provided by Oracle to access the database if your node is a 64-bit choice to install x64. If your node is a 32-bit choice ia32. Use 32-bit in 64-bit environments please use this command
NPM Install--arch=ia32 Oracle
To see if node is 32 or 64-bit: https://github.com/joeferner/node-oracle/issues/154
Node-e "Console.log (Process.arch, require (' OS '). Arch ())"
second, the path settingC:\apps\instantclient_12_1\vc10;c:\apps\instantclient_12_1;
If the compilation succeeds, a oracle_bindings.node appears in the Lib directory of this library if the specified procedure could not being found appears at runtime. Because path is not set correctly, make sure that the path is C:\INSTANTCLIENT_12_1\VC11 in front of C:\instantclient_12_1. If there are other versions of the Oracle client configuration in path, make sure "c:\instantclient_12_1\vc11;c:\instantclient_12_1" is in front of Oracle client.
。 Because there are many OCI.dll, make sure that we use the directory that we installed, if not sure which, you can use depends http://www.dependencywalker.com/check