angular项目安装node-sass报错

0
161

错误信息如下:
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
生成启动时间为 2017/11/3 21:04:22。
节点 1 上的项目“C:\Users\coloz\Desktop\Source\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 Studio 2005;或 3) 如果
将该组件安装到了其他位置,请将其位置添加到系统路径
中。 [C:\Users\coloz\Desktop\Source\node_modules\node-sass\build\binding.sln]
已完成生成项目“C:\Users\coloz\Desktop\Source\node_modules\node-sass\build\binding.sln”(默认目标)的操作 – 失败。

生成失败。

“C:\Users\coloz\Desktop\Source\node_modules\node-sass\build\binding.sln”(默认目标) (1) ->
(_src_\libsass 目标) ->
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如
果将该组件安装到了其他位置,请将其位置添加到系统
路径中。 [C:\Users\coloz\Desktop\Source\node_modules\node-sass\build\binding.sln]

0 个警告
1 个错误

已用时间 00:00:00.69
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\coloz\Desktop\Source\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command “D:\\Program Files\\nodejs\\node.exe” “C:\\Users\\coloz\\Desktop\\Source\\node_modules\\node-gyp\\bin\\node-gyp.js” “rebuild” “–verbose” “–lib
sass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
gyp ERR! cwd C:\Users\coloz\Desktop\Source\node_modules\node-sass
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN @angular/platform-server@4.0.2 requires a peer of @angular/animations@4.0.2 but none was installed.
npm WARN @angular/platform-server@4.0.2 requires a peer of @angular/core@4.0.2 but none was installed.
npm WARN @angular/platform-server@4.0.2 requires a peer of @angular/common@4.0.2 but none was installed.
npm WARN @angular/platform-server@4.0.2 requires a peer of @angular/compiler@4.0.2 but none was installed.
npm WARN @angular/platform-server@4.0.2 requires a peer of @angular/platform-browser@4.0.2 but none was installed.
npm WARN angular2-google-maps@0.17.0 requires a peer of @angular/common@^2.3.1 but none was installed.
npm WARN angular2-google-maps@0.17.0 requires a peer of @angular/core@^2.3.1 but none was installed.
npm WARN @ionic/cli-plugin-ionic-angular@1.3.1 requires a peer of @ionic/app-scripts@^1.3.7 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”win32″,”arch”:”x64″})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.0 postinstall: node scripts/build.js
`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.0 postinstall script. ikely additional logging output above.
npm ERR! This is probably not a problem with npm. There is l
ikely additional logging output above.
2017-11-03T13_04_32_612Z-debug.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\coloz\AppData\Roaming\npm-cache\_logs\
_logs\2017-11-03T13_04_32_612Z-debug.log

解决办法:

npm报MSBUILD错误的解决办法

留下一个答复

Please enter your comment!
Please enter your name here