"hiredis重新构建与.NET Framework 2.0错误"
"hiredis重新构建与.NET Framework 2.0错误"
我尝试删除和安装与 .net framework 3.5 相关的文件(其中包括 2.0 版本)。建议参考这个stackoverflow 帖子。
我尝试按照错误提示的第二条建议安装 visual studio 2005。
我找不到 node_modules 下的 hiredis 文件夹。
我尝试按照这个 stackoverflow 中建议的清理缓存、删除 node_modules,然后再次安装。
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. [D:\path\src\node_modules\hiredis\build\binding.sln]
完整的错误信息可见图片。
admin 更改状态以发布 2023年5月21日
这是一个 Windows 用户经常遇到的常见错误。
如果你最近升级了 Visual Studio 至 2012 或以上版本,则会看到类似上述的错误。
有些文章提到了这个问题,只要使用正确的搜索关键字即可找到其中之一,作者对此进行了详细的解释。具体文章链接:链接
三种解决方法:
1)npm install -g windows-build-tools
,具体可见 stackoverflow
2)安装 Visual Studio 10,然后执行 npm clear cache --force
,再删除 node_modules/
和 package-lock.js
,最后执行 npm config set msvs_version 2010 -g
3)手动下载必要的文件,然后执行 npm config set msvs_version -g
,具体可见 github