我想安装 nodejs
很久了。我尝试通过谷歌搜索,但严重的是我没有任何有效的解决方案。
我的第一个问题是
- 为什么 Nodejs 需要 Microsoft Visual 组件?
其次,根据谷歌的建议,我尝试了以下事情
- 安装了 Visual C++ 2010(更新了变量中的路径)但之后 安装我遇到了更多错误,包括“MSBUILD:错误MSB3428: 无法加载 Visual C++ 组件“VCBuild.exe”。
- 通过
https://github.com/TooTallNate/node-gyp
删除错误,但仍然无法正常工作。 - 再次卸载并安装Node js,但没有成功。
我有以下版本
- Node 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.io 替换为出现问题的包。
也可以为 npm 设置全局设置:
npm config set msvs_version 2010 --global
关于python - MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28621953/