Kattc
Kattc

Reputation: 31

visual studio code - error MSB6006: "CL.exe" exited with code -1073741515

I'm working on Angular 4 project using Visual Studio Code IDE. I want to use modal dialog for that. When I run the 'npm install --save ng2-modal-dialog' npm command in Visual studio code terminal I got the following error message. How I resolve that? I haven't installed Visual Studio.

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

> [email protected] 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

> [email protected] 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/[email protected] 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/[email protected] 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/[email protected] 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/[email protected] 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 [email protected] requires a peer of angular@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of angular-animate@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of angular-aria@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of angular-messages@>=1.4 <1.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser-dynamic@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/router@^3.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ts-smart-logger@~0.0.4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ts-immutable-helper@~0.0.9 but none is installed. You must install peer dependencies yourself.npm WARN [email protected] requires a peer of rxjs@~5.0.0-beta.12 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] 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: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\riot\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\bebop\node_modules\utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
updated 1 package in 42.299s

Angular version -- Angular CLI: 1.7.3 Node: 9.8.0 OS: win32 x64 Angular: 5.2.9

Upvotes: 3

Views: 567

Answers (1)

dragon788
dragon788

Reputation: 3911

For packages that have dependencies that weren't precompiled node-gyp will compile them on demand.

On Linux and macOS this can usually be done with packages that are easy to install via apt/yum/dnf or brew, but on Windows this required some of the Visual C++ tools, which are installed via the VisualStudio20xx build tools.

If you use chocolatey you can install with choco install visualstudio2019buildtools (check the package's page on chocolatey.org for more install options). After the VisualStudio installer shows up in your Start menu you can launch it and install just the components that might be missing like the VS140 C++ bits.

There is apparently an npm package for windows-build-tools or something like that, but it essentially installs the same thing.

Once you've installed the necessary bits, REBOOT. I fought with this for a couple hours before getting frustrated and restarting my computer and suddenly everything JUST WORKED.

Upvotes: 1

Related Questions