Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Problem require('oracle') on windows x64 #104

Open
AndraD1 opened this Issue · 4 comments

4 participants

@AndraD1

I have this installed
--Windows x64 ultimate
--node 0.10.22
--Visual studio 2012 express
--oracle db 11g R2

I installed oracle, this is the error file. As I think everything is fine:

oracle@0.3.4 install C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle
node-gyp rebuild

C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild
Los proyectos de esta soluci¢n se van a compilar de uno en uno. Para habilitar la compilaci¢n en paralelo, agregue el modificador "/m".
executeBaton.cpp
outParam.cpp
connection.cpp
oracle_bindings.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\outParam.cpp(31): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\outParam.cpp(38): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\outParam.cpp(45): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\outParam.cpp(53): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\outParam.cpp(53): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\oracle_bindings.cpp(100): warning C4244: '=' : conversion from 'double' to 'uint32_t', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\connection.cpp(155): warning C4101: 'ex' : unreferenced local variable [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\oracle_bindings.cpp(162): warning C4244: '=' : conversion from 'double' to 'uint32_t', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\executeBaton.cpp(64): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\executeBaton.cpp(65): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\executeBaton.cpp(66): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\executeBaton.cpp(67): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\executeBaton.cpp(68): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\executeBaton.cpp(69): warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\connection.cpp(514): warning C4244: '=' : conversion from 'double' to 'unsigned int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\connection.cpp(590): warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\connection.cpp(595): warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
..\src\connection.cpp(642): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocnum(133): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8::Handle)' [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
with
[
T=v8::Object
]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocnum(133): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8::Handle)' [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
with
[
T=v8::FunctionTemplate
]
C:\Users\Brio.node-gyp\0.10.22\deps\v8\include\v8.h(218): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8::Handle)' [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
with
[
T=v8::Object
]
C:\Users\Brio.node-gyp\0.10.22\deps\v8\include\v8.h(218): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8::Handle)' [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
with
[
T=v8::FunctionTemplate
]
C:\Users\Brio.node-gyp\0.10.22\deps\v8\include\v8.h(184): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8::Handle)' [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
with
[
T=v8::Object
]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory(212): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8::Handle)' [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
with
[
T=v8::Object
]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory(212): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8::Handle)' [C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\oracle_bindings.vcxproj]
with
[
T=v8::FunctionTemplate
]
Creating library C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\Release\oracle_bindings.lib and object C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\Release\oracle_bindings.exp
Generating code
Finished generating code
oracle_bindings.vcxproj -> C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle\build\Release\oracle_bindings.node
oracle@0.3.4 C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle



but when do require ('oracle') to my web project when
node app.js

I have this error:


module.js:356
Module._extensionsextension;
^
Error: no errorC:\node\express\ORM\node_modules\oracle\build\Release\oracle_bind
ings.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\node\express\ORM\node_modules\oracle\lib\oracle.js
:2:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)



can not load module node

@raztus
Collaborator

I don't understand how you're building this. Are you using npm install oracle, or trying to build the raw project (i.e., as cloned from github)? It looks like you're building in a different directory than your project files, which is why your project can't find the module:

Build dir: C:\Users\Brio\AppData\Roaming\npm\node_modules\oracle
Project dir: C:\node\express\ORM\nodemodules\oracle\build\Release\oracle_bind

That project dir also looks wrong because "nodemodules" should be "node_modules". That may have been a copy/paste error, though.

If you're cloning this and building, you need to put the oracle driver in your project's node_modules directory, then run npm install inside of that. Something like:

> cd C:\node\express\ORM\node_modules\
> git clone https://github.com/joeferner/node-oracle oracle
> cd oracle
> npm install
@AndraD1

excuse the confusion of nodemodules and node_modules.
I forget to change the character _ for you html code

hello, try to clone the project from the git repository, but still I keep having the error.

Previously if I was taking the command npm install oracle

yet I still get the error :(


module.js:356
Module._extensions[[extension]](this, filename);
^
Error: no errorC:\node\express\ORM\node_modules\oracle\build\Release\oracle_bindings.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\node\express\ORM\node_modules\oracle\lib\oracle.js:2:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
8 Dec 22:54:01 - [nodemon] app crashed - waiting for file changes before starting...

@chk-

I had the same issue and solved it by providing the correct PATH ENVIRONMENT VARIABLE.
f.e.: PATH = ...;C:\oracle_instantclient

@Enerbrain

I've the same configuration and the same problem.

var oracle = require('oracle');
Error: no errorC:\node_modules\oracle\build\Release\oracle_bindings.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\node_modules\oracle\lib\oracle.js:2:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.