MSBUILD:错误MSB3428:无法加载Visual C ++组件“VCBuild.exe”

我正在尝试从很长一段时间安装nodejs 。 我试过search谷歌,但认真,我没有任何工作的解决scheme。

我的第一个问题是

  1. 为什么Nodejs需要Microsoft Visual组件?

其次,根据谷歌的build议,我尝试了下面的东西

  • 已安装的Visual C ++ 2010(更新path中的variables),但安装后,我得到了更多的错误,包括“MSBUILD:错误MSB3428:无法加载VisualC ++组件”VCBuild.exe“。
  • 通过https://github.com/TooTallNate/node-gyp获取错误,但仍然无法正常工作。
  • 卸载并重新安装Node js,但没有成功。

我有以下版本

  • 节点js 0.12
  • Python 2.7
  • Ruby 1.9.3
  • Windows 7 64位。

当我运行npm-install ,出现如下错误

 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 Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. 

我的package.json如下所示:

 { "name": "TRest", "version": "0.1.0", "devDependencies": { "grunt": "~0.4.2", "grunt-contrib-watch": "~0.5.3", "grunt-sass": "~0.11.0", "grunt-pixrem": "^0.1.2", "grunt-legacssy": "^0.2.0", "grunt-contrib-concat": "~0.3.0", "grunt-contrib-uglify": "~0.3.2", "node-bourbon": "^1.0.0" } } 

你可以通过这个来告诉npm使用Visual Studio 2010 …

 npm install socket.io --msvs_version=2010 

将socket.ioreplace为出现问题的软件包。

也可以设置npm的全局设置:

 npm config set msvs_version 2010 --global 

我试图安装strongloop,并得到这个错误“MSBUILD:错误MSB3428:无法加载VisualC ++组件”VCBuild.exe“。我能够解决这个问题。

在你的windows上用$ npm install -gfind哪个节点$哪个$哪个节点进入cd目录后,在目录cd里面进入node_modules \ npm文件夹,最后:$ npm install node-gyp @ latest

或者试试npm install --global --production windows-build-tools