2Toad / node-teradata

Teradata for Node.js
MIT License
6 stars 5 forks source link

npm install gives MSBUILD : error MSB3428: Could not load the Visual C++ component #47

Closed azimshaik closed 6 years ago

azimshaik commented 6 years ago

I am not sure about what this error is, I am getting this while installing node-teradata package through npm

 C:\Users\SHAIK\Documents\nodeworkspace\nodeTeradataDB> npm install node-teradata

> java@0.9.1 install C:\Users\SHAIK\Documents\nodeworkspace\nodeTeradataDB\node_modules\java
> node-gyp rebuild

C:\Users\SHAIK\Documents\nodeworkspace\nodeTeradataDB\node_modules\java>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" 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 Microso
ft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\Users\SHAIK\Documents\nodeworksp
ace\nodeTeradataDB\node_modules\java\build\binding.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
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:\Users\SHAIK\Documents\nodeworkspace\nodeTeradataDB\node_modules\java
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN nodeteradatadb@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.9.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.9.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SHAIK\AppData\Roaming\npm-cache\_logs\2018-08-27T15_31_32_868Z-debug.log
azimshaik commented 6 years ago

I was able to fix this issue with this

npm install -g --production windows-build-tools

JasonPierce commented 6 years ago

Thanks for sharing this with the community @azimshaik