美文网首页
MSBUILD : error MSB3428: 未能加载 Vi

MSBUILD : error MSB3428: 未能加载 Vi

作者: 有内涵的Google | 来源:发表于2021-06-21 19:47 被阅读0次

    前言

    在使用npm安装项目依赖的时候报错MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装 .NET Framework 2. 如下图:

    npm 错误

    解决

    原因是缺少windows构建插件,所以我们只需要安装一下就好了

    npm install --global --production windows-build-tools 
    

    成功提示:

     Starting installation...
    Launched installers, now waiting for them to finish.
    This will likely take some time - please be patient!
    
    Status from the installers:
    ---------- Visual Studio Build Tools ----------
    Still waiting for installer log file...
    ------------------- Python --------------------
    Successfully installed Python 2.7
    

    最后将原有的依赖删除,重新安装依赖就好了

     rm -rf node_modules\  && npm install
    

    Tips
    这里一定要使用超级管理员打开 PowerShell,否知会报权限不足的:

    Starting installation...
    Please restart this script from an administrative PowerShell!
    

    相关文章

      网友评论

          本文标题:MSBUILD : error MSB3428: 未能加载 Vi

          本文链接:https://www.haomeiwen.com/subject/xvquyltx.html