Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install node-oracledb givers error #733

Closed
parthsw opened this issue Jul 17, 2017 · 7 comments
Closed

npm install node-oracledb givers error #733

parthsw opened this issue Jul 17, 2017 · 7 comments

Comments

@parthsw
Copy link

parthsw commented Jul 17, 2017

I am using Windows 7 64 bit OS. I have installed below things:

  1. Node (v.6.11.0) - npm(3.10.10)
  2. Python 2.7.13
  3. We are using Toad for Oracle Xpert 12.0 (Client version 11.2.0). Client version found using
    SELECT
    DISTINCT
    s.client_version
    FROM
    v$session_connect_info s
    WHERE
    s.sid = SYS_CONTEXT('USERENV', 'SID');
  4. I have separately installed Microsoft Visual C++ 2005 Redistributable (x64).

Here's the PATH variable:
C:\Oracle\product\11.2.0\client_1\bin;C:\Python27;C:\Python27\Scripts;C:\Program Files\nodejs;%SystemRoot%\system32;%SystemRoot%;

Here's the OCI_INC_DIR variable:
C:\Oracle\product\11.2.0\client_1\oci\include

Here's the OCI_LIB_DIR varaible:
C:\Oracle\product\11.2.0\client_1\oci\lib\msvc\

Note: I do not have below folder structure:
set OCI_LIB_DIR=C:\oracle\instantclient\sdk\lib\msvc
set OCI_INC_DIR=C:\oracle\instantclient\sdk\include

In a project directory, I'm trying to issue below command:
npm install oracledb --save

Below is the error that I'm getting:

[email protected] install D:\Parth\userprofiles\node_modules\oracledb
node-gyp rebuild

D:\Parth\userprofiles\node_modules\oracledb>if not defined npm_config_node_gyp (
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modu
les\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.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the
file specified. [D:\Parth\userprofiles\node_modules\oracledb\build\oracledb.vc
xproj]

gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Parth\userprofiles\node_modules\oracledb
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "install" "oracledb" "--save"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
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! D:\Parth\userprofiles\npm-debug.log

Thanks in advance for looking into this

@anthony-tuininga
Copy link
Member

That error suggests that you don't have MSBUILD or Visual Studio installed. You can find some information here. Prebuilt binaries are still a work in progress so for now you have to build yourself.

@parthsw
Copy link
Author

parthsw commented Jul 17, 2017

Actually I already have Visual Studio 2015 installed on my machine.

@anthony-tuininga
Copy link
Member

Actually I already have Visual Studio 2015 installed on my machine.

Are you running the "Visual Studio 2015 Developer Command Prompt"? That will set everything up for you. From the error above it looks like cl.exe is not in the PATH, even if it is installed.

@cjbj
Copy link
Member

cjbj commented Jul 17, 2017

Or see #18

@parthsw
Copy link
Author

parthsw commented Jul 18, 2017

[ npm config set msvs_version 2013 --global ] solved the issue for me. Thanks for looking into this.

@paragonda1
Copy link

I am using Windows 7 64 bit OS. I have installed below things:

Node (v.6.11.0) - npm(3.10.10)
Python 2.7.13
We are using Toad for Oracle Xpert 12.0 (Client version 11.2.0). Client version found using

When I try to run "node server.js" getting the below error

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd C:\Pradeep\Telus\NGF\ToolCrib_NGF\root\server

C:\Pradeep\Telus\NGF\ToolCrib_NGF\root\server>node server.js
module.js:471
throw err;
^

Error: Cannot find module 'oracledb'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Pradeep\Telus\NGF\ToolCrib_NGF\root\server\service
s\tool.service.js:6:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

C:\Pradeep\Telus\NGF\ToolCrib_NGF\root\server>

@cjbj
Copy link
Member

cjbj commented Jul 27, 2017

@paragonda1 you could do worse than look at https://github.com/oracle/node-oracledb/blob/dev-2.0/INSTALL.md#troubleshooting And read the install instructions. Note to get the v2 pre-release you currently need to run npm install oracle/node-oracledb.git#dev-2.0 otherwise you actually get v1.

The person who reported this issue has solved, so I'm closing this. You can open a new issue if you still have problems.

@cjbj cjbj closed this as completed Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants