gpt4 book ai didi

angular - Visual Studio Code - 错误 MSB6006 : "CL.exe" exited with code -1073741515

转载 作者:行者123 更新时间:2023-12-05 06:33:50 26 4
gpt4 key购买 nike

我正在使用 Visual Studio Code IDE 开发 Angular 4 项目。我想为此使用模态对话框。当我在 Visual Studio 代码终端中运行“npm install --save ng2-modal-dialog”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 版本 -- Angular CLI:1.7.3节点:9.8.0操作系统:win32 x64 Angular :5.2.9

最佳答案

对于具有未预编译的依赖项的包,node-gyp 将按需编译它们。

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

如果您使用 chocolatey,则可以使用 choco install visualstudio2019buildtools 安装(查看 chocolatey.org 上的软件包页面以了解更多安装选项)。 VisualStudio 安装程序出现在“开始”菜单中后,您可以启动它并只安装可能缺少的组件,例如 VS140 C++ 位。

windows-build-tools 显然有一个 npm 包或类似的东西,但它本质上安装了同样的东西。

安装必要的位后,重新启动。我为此苦苦挣扎了几个小时,然后感到沮丧并重新启动了我的计算机,突然间一切正常了。

关于angular - Visual Studio Code - 错误 MSB6006 : "CL.exe" exited with code -1073741515,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50522343/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com