我现在正试图从很长一段时间内安装nodejs。我试着在谷歌上搜索,但我真的没有找到任何可行的解决方案。
我的第一个问题是
第二,根据谷歌的建议,我尝试了以下几点
https://github.com/TooTallNate/node-gyp删除错误,但仍然无法工作。我有以下版本
当我运行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"
}
}发布于 2015-05-11 04:43:34
您可以通过这样做告诉npm使用2010 .
npm install socket.io --msvs_version=2010用给出问题的包替换socket.io。
还可以设置国家预防机制的全球设置:
npm config set msvs_version 2010 --global发布于 2017-10-06 14:11:06
或者尝试npm install --global --production windows-build-tools
发布于 2020-01-27 18:25:41
使用带有管理权限的PowerShell并运行:
npm install --global --production windows-build-tools@4.0.0在那之后,它将顺利地工作。
https://stackoverflow.com/questions/28621953
复制相似问题