Steps1 Installing Oracle 11g
Oracle official website Download Orcale 11g, "Now still do not use 10g, anyway I did not use"
2 Installing Microsoft Visual studio2012 Express
microsoft visual studio2013
the use of the installation did not succeed, but it should be 2013. Try again later.
3 Installing Nodejs
The latest version is best, NPM will be called at compile time before 1.3.15 node-gyp
VCBuild.exe
, not found under vs2012 VCBuild.exe
.
4 Installing the Oracle Instant Client
Download Version 12.1.0.1.0
the And, and instantclient-basic-windows.x64-12.1.0.1.0.zip
instantclient-sdk- windows.x64-12.1.0.1.0.zip
extract them into the C:\instantclient_12_1
folder, because the files in the two zip are different, so merge into the same folder will not occur overwrite.
5 Setting environment variables
Oci_include_dir=c:\instantclient_12_1\sdk\includeoci_lib_dir=c:\instantclient_12_1\sdk\lib\msvc\vc11oci_ Version=12path= ...; C:\instantclient_12_1\vc11;c:\instantclient_12_1
Make sure the Path is c:\instantclient_12_1\vc11 in front of the c:\instantclient_12_1, preferably on the front, after Oracle is installed, if you put it in the back, you might call the file under the Oracle installation directory, Sometimes compilation fails.
6 Installing python2.7
Installation python2.7
, 3.x
version no, Node-gyp 3.x
·,
environment variable Path added C:\Python27
, if the 3.x version is installed to remove from the environment variable!
7 Installing NODE-GYP
cmd Command window:
NPM install-g Node-gyp
8 Installing Node-oracle
Cmd:
NPM Install-g Oracle
It is recommended to install globally because different versions are required on different machines, so that conflicts between different people can be saved in co-development, especially when using Git.
Error handling1 Msbuild:error msb3411:could not load the Visual C + + component "VCBuild.exe".Error content:
Msbuild:error msb3411:could not load the Visual C + + component "VCBuild.exe". If the component isn't installed, either 1) Install the Microsoft Windows SDK for Windows Server and. NET Framework 3.5, or 2) install Microsoft Visual Studio 2008. [C:\users\administrator\appdata\roaming\npm\node_modules\oraclebuild\binding.sln]gyp ERR! Build Errorgyp err! Stack Error: ' C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe ' failed with exit Code:1gyp err! Stack at Childprocess.onexit (C:\Program files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23) Gyp err! Stack at ChildProcess.EventEmitter.emit (events.js:98:17) Gyp err! Stack at Process.childprocess._handle.onexit (child_process.js:789:12) Gyp err! System windows_nt 6.1.7601gyp err! Command "Node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "Rebuild" Gyp err! CWD C:\Users\Administrator\AppData\Roaming\npm\node_modules\oraclegyp err! Node-v V0.10.21gypErr! Node-gyp-v V0.10.10gyp err! Not OKNPM err! Weird error 1NPM err! Not OK Code 0
Reason
NPM was previously called at compile time in 1.3.15 and node-gyp
VCBuild.exe
is not found under vs2012 VCBuild.exe
, vs2012 and later versions are msbuild.exe as compilers.
Solve:
Set the MSVs compiler of NPM to vs2012
CMD execution:
NPM Config set msvs_version--global
Node-oracle installation under Windows compilation