i was trying to run command : npm install oracledb .
node version : 5.0.0
npm : 3.4.1
getting below error. how to resolve this issue?
C:\project\source\nodecrud-master\node_modules\oracledb>if not defined npm_confi
g_node_gyp (node "C:\Users\rcho\AppData\Roaming\npm\node_modules\npmbin
\node-gyp-bin....\node_modules\node-gypbin\node-gyp.js" rebuild ) else (nod
e rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere. [C:\project\source\nodecrud-master\node_modules\oracle
dbbuildbinding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\rcho\AppData\Roaming
\npm\node_modules\npm\node_modules\node-gyp\libbuild.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:apps\software\node.exe" "C:\Users\rcho\AppDat
a\Roaming\npm\node_modules\npm\node_modules\node-gypbin\node-gyp.js" "r
ebuild"
gyp ERR! cwd C:\project\source\nodecrud-master\node_modules\oracledb
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:apps\software\node.exe" "C:\Users\rcho\AppData\
Roaming\npm\node_modules\npmbin\npm-cli.js" "install" "oracledb"
npm ERR! node v5.0.0
npm ERR! npm v3.4.1
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 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:\project\source\nodecrud-master\npm-debug.log
How to get resolve this issue ?
Review https://community.oracle.com/docs/DOC-931127 by @bchr02
Which version of Visual studio do you have?
I have VS 2015 so when I built oracledb 1.4 I needed to specify the correct version of build tools.
If you download the repo and build seperatly run node-gyp rebuild --msvs_version=2015 within the oracledb folder
I could not get it to work with npm install --msvs_version =2015 as node-gyp will error with 'KeyError: 2015'
windows is finicky about how it handles which run times it should
@bmulcahy does INSTALL need updating?
@cjbj the issue is with node-gyp not the oracledb install. After installing vs2015 I updated both npm and node to the latest version I then ran npm install -g --msvs_version=2015 node-gyp rebuild. This solved my own build problem. If users have the latest version of node-gyp they may try adding an user env variable GYP_MSVS_VERSION=2015.
after installing.. MS visual studio 2013. issue solved. Thanks.
@rchokalingam I am glad you were able to work around this issue, however, @cjbj we should consider reopening it or creating a new one so that we can fully address the problem.
According to the Installation section of node-gyp's README:
Windows 10:
- Install the latest version of npm (3.3.6 at the time of writing)
- Install Python 2.7 from https://www.python.org/download/releases/2.7/ and make sure its on the System Path
- Install Visual Studio Community 2015 Edition. (Custom Install, Select Visual C++ during the installation)
- Set the environment variable GYP_MSVS_VERSION=2015
- Run the command prompt as Administrator
- $ npm install (--msvs_version=2015) <-- Shouldn't be needed if you have set GYP_MSVS_VERSION env
- If the above steps have not worked or you are unsure please visit http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64 for a full walkthrough
The takeaways here, as it relates to node-oracledb's current Windows INSTALL instructions, are as follows:
We should consider updating node-oracledb's current Windows INSTALL instructions to reflect these changes, however, I was not aware Oracle was supporting Visual Studio's 2015 because the Oracle Database Client Quick Installation Guide 12c Release 1 (12.1) for Microsoft Windows x64 (64-Bit). only lists 2013 as the highest compatible version. Of course I realize this doesn't mean it won't work which is why we should probably mention something on the install instructions...
I used the instant client when I buillt oracledb if that makes any
difference
On Fri, Dec 18, 2015 at 6:05 PM, Bill Christo [email protected]
wrote:
@rchokalingam https://github.com/rchokalingam I am glad you were able
to work around this issue, however, @cjbj https://github.com/cjbj we
should consider reopening it or creating a new one so that we can fully
address the problem.According to the Installation section of node-gyp's README
https://www.npmjs.com/package/node-gyp:Windows 10:
- Install the latest version of npm (3.3.6 at the time of writing)
- Install Python 2.7 from https://www.python.org/download/releases/2.7/
and make sure its on the System Path- Install Visual Studio Community 2015 Edition. (Custom Install,
Select Visual C++ during the installation)- Set the environment variable GYP_MSVS_VERSION=2015
- Run the command prompt as Administrator
- $ npm install (--msvs_version=2015) <-- Shouldn't be needed if you
have set GYP_MSVS_VERSION env- If the above steps have not worked or you are unsure please visit
http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64
for a full walkthroughThe takeaways here, as it relates to node-oracledb's current Windows
INSTALL instructions, are as follows:
- the new requirement for Visual Studio 2015 (when compared to past
versions) to do a "Custom Install" and "Select Visual C++ during the
installation".- The need to set the environment variable GYP_MSVS_VERSION=2015.
We should consider updating updating node-oracledb's current Windows
INSTALL instructions to reflect these changes, however, I was not aware
Oracle was supporting Visual Studio's 2015 because the Oracle Database
Client Quick Installation Guide 12c Release 1 (12.1) for Microsoft Windows
x64 (64-Bit).
https://docs.oracle.com/database/121/NXCQI/toc.htm#NXCQI108 only lists
2013 as the highest compatible version.—
Reply to this email directly or view it on GitHub
https://github.com/oracle/node-oracledb/issues/302#issuecomment-165916971
.
To add to my last comment. I just tried testing two separate systems. One was a fresh install of Windows 7 and the other a fresh install of Windows 10. Both had Visual Studios 2015, Instant Client 12.1.0.2.0, Python 2.7.11 and node-v5.3.0. Everything 64bit.
The only thing I did different from the past was when I installed Visual Studio 2015 I chose to do a "Custom Install" and selected "Visual C++" option during the installation.
I can confirm that I did not need to set the environment variable GYP_MSVS_VERSION=2015 and that it was not set. I could also confirm that when I would run: npm config get msvs_version it would return undefined.
That being said, I do not understand under what scenario one would need to use GYP_MSVS_VERSION=2015. when it is clearly working from a clean install.
having issues getting npm install oracledb to work, i have installed vs2017 community & also python as it says on the oracle site. im getting the below error
C:\Usersandy.price\Documents\development\neyber-node\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npmbin\node-gyp-bin\....\node_modules\node-gypbin\node-gyp.js" rebuild ) else (node "" rebuild ) declaration is correct, and that the file exists on disk. npm ERR! [email protected] install: npm ERR! Please include the following file with any support request:
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Usersandy.price\Documents\development\neyber-node\node_modules\oracledbbuild\oracledb.vcxproj(20,3): error M
SB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the
gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\libbuild.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_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Usersandy.price\Documents\development\neyber-node\node_modules\oracledb
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "oracledb"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLEnode-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! C:\Usersandy.price\Documents\development\neyber-node\npm-debug.log
@andy-t-b-price this is a closed issue. Maybe try some googling, or look at windows-build-tools https://github.com/oracle/node-oracledb/issues/697#issuecomment-313846923 or See #18?
npm install --global --production windows-build-tools
@bellaj that's works for me, thanks!
thank u so much @bellaj .that worked for me
@ananthsubbu you might want to check out the prebuilt binaries on the Development branch: npm install oracledb@dev See https://github.com/oracle/node-oracledb/issues/716
Most helpful comment
npm install --global --production windows-build-tools