visual studio code - 错误MSB6006:" CL.exe"退出,代码为-1073741515

时间:2018-05-25 05:50:35

标签: angular npm

我正在使用Visual Studio Code IDE处理Angular 4项目。我想使用模态对话框。当我运行  npm install --save ng2-modal-dialog'在Visual Studio代码终端中的npm命令我收到以下错误消息。我如何解决这个问题?我还没有安装Visual Studio。

PS D:\Projects\payments> npm install --save ng2-modal-dialog

> utf-8-validate@1.2.2 install D:\Projects\payments\node_modules\bebop\node_modules\utf-8-validate
> node-gyp rebuild


D:\Projects\payments\node_modules\bebop\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" exited with code -1073741515. [D:\Pr
ojects\payments\node_modules\bebop\node_modules\utf-8-validate\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\payments\node_modules\bebop\node_modules\utf-8-validate
gyp ERR! node -v v9.8.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> bufferutil@1.2.1 install D:\Projects\payments\node_modules\bufferutil
> node-gyp rebuild


D:\Projects\payments\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" exited with code -1073741515. [D:\Pr
ojects\payments\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\payments\node_modules\bufferutil
gyp ERR! node -v v9.8.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN @angular/cdk@6.0.2 requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/cdk@6.0.2 requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.npm WARN @angular/material@6.0.2 requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@6.0.2 requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-material@1.1.9 requires a peer of angular@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN angular-material@1.1.9 requires a peer of angular-animate@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN angular-material@1.1.9 requires a peer of angular-aria@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN angular-material@1.1.9 requires a peer of angular-messages@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of @angular/core@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of @angular/common@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of @angular/compiler@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of @angular/platform-browser@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of @angular/platform-browser-dynamic@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of @angular/router@^3.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of ts-smart-logger@~0.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of ts-immutable-helper@~0.0.9 but none is installed. You must install peer dependencies yourself.npm WARN angular2-route-service@0.0.32 requires a peer of rxjs@~5.0.0-beta.12 but none is installed. You must install peer dependencies yourself.
npm WARN angular2-route-service@0.0.32 requires a peer of zone.js@~0.6.25 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@0.3.8 (node_modules\riot\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@0.3.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.2 (node_modules\bebop\node_modules\utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.2 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 (node_modules\bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ ng2-modal-dialog@2.0.5
updated 1 package in 42.299s

角度版 - Angular CLI:1.7.3 节点:9.8.0 操作系统:win32 x64 Angular:5.2.9

1 个答案:

答案 0 :(得分:1)

对于具有未 height: PROFILE_DIAMETER, width: PROFILE_DIAMETER, borderRadius: PROFILE_DIAMETER / 2, marginLeft: 20, top: -20, flex: 0, resizeMode: 'cover', overflow: 'hidden', transform: [{translateY: translateImageY()}, {scale: imgScale()}, {translateX: translateImageX()}] }} 预编译的依赖关系的软件包,将按需对其进行编译。

在Linux和macOS上,通常可以使用易于通过apt / yum / dnf或brew安装的软件包来完成此操作,但是在Windows上,这需要一些Visual C ++工具,这些工具是通过VisualStudio20xx构建工具安装的。 / p>

如果您使用Chocolatey,则可以使用node-gyp进行安装(有关更多安装选项,请查看Chocolatey.org上的软件包页面)。在Visual Studio安装程序出现在“开始”菜单中之后,您可以启动它并仅安装可能缺少的组件,例如VS140 C ++位。

显然有一个choco install visualstudio2019buildtools或类似的npm软件包,但实际上安装了相同的东西。

一旦安装了必要的位,请重新启动。我为此奋斗了两个小时,然后沮丧并重新启动计算机,突然一切都变得正常了。