npm rebuild出错,MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”

npm run dev后报如下错

Module build failed: Error: Missing binding E:\items\dev\ann00\devopsAdmin\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 8.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
    at module.exports (E:\items\dev\ann00\devopsAdmin\node_modules\node-sass\lib\binding.js:15:13)
    at Object. (E:\items\dev\ann00\devopsAdmin\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object. 

跟着提示执行npm rebuild node-sass后又报如下错

gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
生成启动时间为 2018/9/8 17:56:23。
节点 1 上的项目“E:\items\dev\ann00\devopsAdmin\node_modules\node-sass\build\binding.sln”(默认目标)。
ValidateSolutionConfiguration:
  正在生成解决方案配置“Release|x64”。
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Stu
dio 2005;或 3) 如果将该组件安装到了其他位置,请将其位置添加到系统路径中。 [E:\items\dev\ann00\devopsAdmin\node_modules\node-sass\build\binding.sln]
已完成生成项目“E:\items\dev\ann00\devopsAdmin\node_modules\node-sass\build\binding.sln”(默认目标)的操作 - 失败。
生成失败。

这是由于未安装Microsoft Visual Studio Express 2013 for Windows Desktop导致的,安装即可
下载地址http://download.microsoft.com/download/6/F/4/6F470037-A5D3-4552-9563-696A9D0EA86B/VS2013_RTM_DskExp_CHS.iso

你可能感兴趣的:(npm rebuild出错,MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”)