我想运行`node-gyp rebuild`时出现错误

时间:2019-01-22 08:44:11

标签: node-gyp

环境:Windows10 x64,nodejs v8.15.0 python:2.7.6

我想重建我的代码,最后一步是node-gyp rebuild

我得到一个错误:

MSBUILD : error MSB3428: Failed to load Visual C++ component “VCBuild.exe”。To fix this,1) Install .NET Framework 2.0 SDK;2) Install Microsoft Visual Studio 2005;or 3) If the component is installed in a different location, add its location to the system path. [C:\Other Soft\AMO-Tools-Suite-develop\build\binding.sln]
MSBUILD : error MSB3428: Failed to load Visual C++ component “VCBuild.exe”。To fix this,1) Install .NET Framework 2.0 SDK;2) Install Microsoft Visual Studio 2005;or 3) If the component is installed in a different location, add its location to the system path. [C:\Other Soft\AMO-Tools-Suite-develop\build\binding.sln]
MSBUILD : error MSB3428: Failed to load Visual C++ component “VCBuild.exe”。To fix this,1) Install .NET Framework 2.0 SDK;2) Install Microsoft Visual Studio 2005;or 3) If the component is installed in a different location, add its location to the system path. [C:\Other Soft\AMO-Tools-Suite-develop\build\binding.sln]
MSBUILD : error MSB3428: Failed to load Visual C++ component “VCBuild.exe”。To fix this,1) Install .NET Framework 2.0 SDK;2) Install Microsoft Visual Studio 2005;or 3) If the component is installed in a different location, add its location to the system path. [C:\Other Soft\AMO-Tools-Suite-develop\build\binding.sln]
MSBUILD : error MSB3428: Failed to load Visual C++ component “VCBuild.exe”。To fix this,1) Install .NET Framework 2.0 SDK;2) Install Microsoft Visual Studio 2005;or 3) If the component is installed in a different location, add its location to the system path. [C:\Other Soft\AMO-Tools-Suite-develop\build\binding.sln]
MSBUILD : error MSB3428: Failed to load Visual C++ component “VCBuild.exe”。To fix this,1) Install .NET Framework 2.0 SDK;2) Install Microsoft Visual Studio 2005;or 3) If the component is installed in a different location, add its location to the system path. [C:\Other Soft\AMO-Tools-Suite-develop\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:\Users\18363\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:262: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.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\18363\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Other Soft\AMO-Tools-Suite-develop
gyp ERR! node -v v8.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

我尝试使用以下方法修复它:

npm config set msvs_version 2017 -global

和:

npm install -global -production windows-build-tools

但这没用。

1 个答案:

答案 0 :(得分:0)

g++ gcc libgcc libstdc++

您应安装上述工具。