Unable to install leveldown npm package, node-gyp error MSBuild.exe failed with exit code: 1
- Node Version: node: v12.13.0 npm: 6.12.0
- Platform: windows 10
- Module: was trying to install levelDown, installation failing at node-gyp
Verbose output (from npm or node-gyp):
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.17763
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 D:\Source\Project\node_modules\leveldown
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
Things i have tried to fix this issue:
- Installed python latest version
- Installed visual studio 2017 community version with c++ dev tools
- set VCTargetsPath and MSBuild enviroments variables
- set VCTargetsPath in windows registry
- Tried running npm install --global --production windows-build-tools
but nothing seems to work so far please help
Got the same error here.
- Node Version: node: v13.1.0 npm: 6.13.0
- Platform: windows 10
- Module: was trying to install sharp, installation failing when trying to rebuild node-gyp
> [email protected] install project\node_modules\sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && n
info sharp Using cached npm-cache\_libvips\libvips-8.7.4-win32-x
info sharp Creating project\node_modules\sharp\build\Release
info sharp Copying DLLs from project\node_modules\sharp\vendor\lib t
prebuild-install WARN install No prebuilt binaries found (target=13.1.0 runtime=node arch=x64 l
sharp>if not defined npm_config_node_gyp (node odules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\np
libvips-cpp.vcxproj -> project\node_modules\sharp\build\Release\\libvips-cpp.dll
common.cc
metadata.cc
stats.cc
operations.cc
pipeline.cc
sharp.cc
utilities.cc
win_delay_load_hook.cc
project\node_modules\sharp\src\stats.cc(130,1): error C2661: 'v8::Object::Set' : aucune fonction surchargée ne nécessite 2 arguments [project\node_modules\sharp\build\sharp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
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 project\node_modules\sharp
gyp ERR! node -v v13.1.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
> [email protected] install project\node_modules\sharp ... project\node_modules\sharp\src\stats.cc(130,1): error C2661: 'v8::Object::Set' : aucune fonction surchargée ne nécessite 2 arguments [project\node_modules\sharp\build\sharp.vcxproj] ... gyp ERR! node -v v13.1.0
@ladevieq That error suggests the module being compiled is not compatible with the version of Node.js being used. It looks like Node.js 13 compatibility was only added to [email protected]: https://github.com/lovell/sharp/issues/1909
@richardlau Ok thanks man
@Haris-Jamil There's not enough information in the verbose output you posted to say what your problem is ("failed with exit code: 1" just means something went wrong and the real error would be in the lines above it). Things you can check are the version of leveldown being installed and whether that is compatible with Node.js 12.
@denglai Not related to this issue. Your error is:
[node-java] Error: not found: javac.exe
gyp: Call to 'node findJavaHome.js' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
Which is coming from node-java. You should report your issue to https://github.com/joeferner/node-java.