Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.4K Development
- 17 Developer Projects
- 139 Programming Languages
- 293.1K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 161 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 475 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Installing node-oracledb on Microsoft Windows
Comments
-
Got the following compiler error with Visual Studio 2012 and Instant Client: > [email protected] install c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb > node-gyp rebuild c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. njsOracle.cpp njsPool.cpp njsConnection.cpp njsResultSet.cpp c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(336): error C2988: unrecognizable template declaration/definition (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(336): error C2059: syntax error : 'using' (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(469): error C2988: unrecognizable template declaration/definition (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(469): error C2059: syntax error : 'using' (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(576): error C2061: syntax error : identifier 'WeakCallbackType' (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(642) : see reference to class template instantiation 'v8::PersistentBase' being compiled c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(637): error C2253: 'PersistentBase' : pure specifier or abstract override specifier only allowed on virtual function (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(844): error C2253: 'Global' : pure specifier or abstract override specifier only allowed on virtual function (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(847) : see reference to class template instantiation 'v8::Global' being compiled c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(852): error C2988: unrecognizable template declaration/definition (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] c:\users\yuzhou\.node-gyp\4.4.0\include\node\v8.h(852): error C2059: syntax error : 'using' (..\src\njs\src\njsOracle.cpp) [c:\program files (x86)\microsoft visual studio 11.0\vc\bin\node_modules\oracledb\build\oracledb.vcxproj] ...
-
Post a GitHub issue or post to the OTN forum if you have install issues. Commenting on this doc is not the best place.
-
Use:
npm i https://github.com/bchr02/node-oracledb#v1.8.0
or to always target the most current release use:
npm i https://github.com/bchr02/node-oracledb#prebuild_support
-
As well instead of each time writing "npm install --msvs_version=2015"
you can make system variable GYP_MSVS_VERSION = '2015'.
I've just installed oraclebd on Win'7 x64 with this howto. Thanks a lot @bchr02 for this!
Before installation VS2015 CE was already installed but without C++ part. So I have got same errors. Then I start VS2015 and choose New project - C++ - Add WindowsSDK 10. After installation has finished and creating GYP_MSVS_VERSION env. variable node-gyp started to compile without errors.
BTW, it said that Microsoft Visual C++ Build Tools 2015 Technical Preview could be used now instead of installing MS VisualStudio. I didn't try it yet.
This is what worked for me too......I did a default install of Community edition 2015; create project; add Visual C++
-
npm instasll oracledb on windows :
1.
instantclient-basic-windows.x64-12.1.0.2.0.zip
instantclient-sdk-windows.x64-12.1.0.2.0.zip
OCI_INC_DIR=D:\instantclient_12_1\sdk\include
OCI_LIB_DIR=D:\instantclient_12_1\sdk\lib\msvc
2.
npm install --global windows-build-tools<br/>
3.
npm install oracledb
but when i run the test.
C:\Users\luthy\Desktop\tes>node app.js
C:\Users\luthy\Desktop\tes\node_modules\oracledb\lib\oracledb.js:38
throw err;
^Error: %1 is not a valid Win32 application.
\\?\C:\Users\luthy\Desktop\tes\node_modules\oracledb\build\Release\oracledb.node
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\luthy\Desktop\tes\node_modules\oracledb\lib\oracledb.js:35:19)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)my node and Oracle Instant Client both are 64-bit
-
Hep me!Help me!
njsOracle.cpp
njsPool.cpp
njsConnection.cpp
njsResultSet.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\include\dpiLob.h(34): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\njs\src\njsConnection.cpp) [C:\Use
AppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
njsMessages.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\include\dpiLob.h(34): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\njs\src\njsResultSet.cpp) [C:\User
ppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
njsIntLob.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\include\dpiLob.h(34): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\njs\src\njsOracle.cpp) [C:\Users\Y
ata\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\include\dpiLob.h(34): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\njs\src\njsPool.cpp) [C:\Users\Yua
a\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
dpiEnv.cpp
dpiEnvImpl.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\src\dpiEnvImpl.h(30): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiEnv.cpp) [C:\Users\Yuan
\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\src\dpiEnvImpl.h(30): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiEnvImpl.cpp) [C:\Users\
Data\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
dpiException.cpp
dpiExceptionImpl.cpp
dpiConnImpl.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\src\dpiConnImpl.h(30): fatal error C1083: Canno
nclude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiConnImpl.cpp) [C:\User
ppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
dpiDateTimeArrayImpl.cpp
dpiPoolImpl.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\src\dpiEnvImpl.h(30): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiPoolImpl.cpp) [C:\Users
pData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
dpiStmtImpl.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\src\dpiUtils.h(30): fatal error C1083: Cannot o
ude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiDateTimeArrayImpl.cpp) [C
Yuan\AppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
dpiUtils.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\include\dpiLob.h(34): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\njs\src\njsIntLob.cpp) [C:\Users\Y
ata\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
dpiLob.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\include\dpiStmt.h(30): fatal error C1083: Canno
nclude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiStmtImpl.cpp) [C:\User
ppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
dpiCommon.cpp
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\include\dpiLob.h(34): fatal error C1083: Cannot
clude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiLob.cpp) [C:\Users\Yuan
\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
win_delay_load_hook.cc
..\src\dpi\src\dpiCommon.cpp(28): fatal error C1083: Cannot open include file: 'oci.h': No such file or directo
sers\Yuan\AppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb\src\dpi\src\dpiUtils.h(30): fatal error C1083: Cannot o
ude file: 'oci.h': No such file or directory (compiling source file ..\src\dpi\src\dpiUtils.cpp) [C:\Users\Yuan
\Roaming\npm\node_modules\oracledb\build\oracledb.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\b
76:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb
gyp ERR! node -v v7.7.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN Error: EPERM: operation not permitted, rmdir 'C:\Users\Yuan\AppData\Roaming\npm\node_modules'
npm WARN { Error: EPERM: operation not permitted, rmdir 'C:\Users\Yuan\AppData\Roaming\npm\node_modules'
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'rmdir',
npm WARN path: 'C:\\Users\\Yuan\\AppData\\Roaming\\npm\\node_modules' }
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli
tall" "-g" "oracledb"
npm ERR! node v7.7.1
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the oracledb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs oracledb
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls oracledb
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Yuan\npm-debug.log
C:\Users\Yuan>npm install -g oracledb
> [email protected] install C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb
> node-gyp rebuild
C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Program Fi
s\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebu
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at exports._errnoException (util.js:1029:11)
gyp ERR! stack at TLSWrap.onread (net.js:575:26)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Yuan\AppData\Roaming\npm\node_modules\oracledb
gyp ERR! node -v v7.7.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli
tall" "-g" "oracledb"
npm ERR! node v7.7.1
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the oracledb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs oracledb
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls oracledb
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Yuan\npm-debug.log
-
I get the same error:
\\?\\node_modules\oracledb\build\Release\oracledb.
node
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (.\node_modules\oracledb\lib\oracledb.js:35:19)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
What can I do here??
-
I follow all steps but when execute node app.js
ORA-12541: TNS:no listener
Help me!
-
npm instasll oracledb on windows :
1.
instantclient-basic-windows.x64-12.1.0.2.0.zip
instantclient-sdk-windows.x64-12.1.0.2.0.zip
OCI_INC_DIR=D:\instantclient_12_1\sdk\include
OCI_LIB_DIR=D:\instantclient_12_1\sdk\lib\msvc
2.
npm install --global windows-build-tools<br/>
3.
npm install oracledb
but when i run the test.
C:\Users\luthy\Desktop\tes>node app.js
C:\Users\luthy\Desktop\tes\node_modules\oracledb\lib\oracledb.js:38
throw err;
^Error: %1 is not a valid Win32 application.
\\?\C:\Users\luthy\Desktop\tes\node_modules\oracledb\build\Release\oracledb.node
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\luthy\Desktop\tes\node_modules\oracledb\lib\oracledb.js:35:19)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)my node and Oracle Instant Client both are 64-bit
When running your app, make sure
\instantclient_12_1 is added to PATH env variable.
set PATH=D:\instantclient_12_1;%PATH%
-
Hi,
I am able to install and configure everything. But when I run above example I get the error
ORA-12541: TNS:no listener
Is there anything I am missing? Do I need to start oracle server? I dont see any instruction here?