wankdanker / node-odbc

ODBC bindings for node
MIT License
174 stars 79 forks source link

npm install fails #74

Closed Dieginho1908 closed 3 years ago

Dieginho1908 commented 5 years ago

I am having this issue. Please, help me. Any suggestion?

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t ools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 bui ld tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-cli ck the solution, and then selecting "Retarget solution". [C:\Users\diego.gonzalez\Documents\02 -Mis proyectos\node-serv er-pruebas\node_modules\odbc\build\odbc_bindings.vcxproj]

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\lib\build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237: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" "configure" "build" gyp ERR! cwd C:\Users\diego.gonzalez\Documents\02 -Mis proyectos\node-server-pruebas\node_modules\odbc gyp ERR! node -v v10.4.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN server-pruebas@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! odbc@2.0.0-4 install: node-gyp configure build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the odbc@2.0.0-4 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

markdirish commented 5 years ago

I think this is related to this issue: https://github.com/nodejs/node-gyp/issues/1663

Essentially, your node-gyp is out of date and doesn't support your current Windows build tools. Try installing the latest version of node-gyp globally:

npm install --global node-gyp

And see if that fixes the error.