Reputation: 3790
Background:
A project I am working on is built in Angular 7, is based on the Visual Studio 2017 Angular project template, is managed using TeamCity, and more specifically is built on a Windows 10 build agent. We've been able to build this project for the last few months with few issues.
Last Friday, however, we started seeing a strange error when the project was building:
error MSB3073: The command "npm run build -- --prod" exited with code -1073741819.
Now, before anyone gets distracted by the funny command (we did!), npm run build -- --prod
is what Visual Studio 2017 projects are configured to run to build Angular projects by default. If you run that command in your Visual Studio Terminal Window, what you'll see it evaluates down to ng build "--prod"
- specifically, in your Web project, you'll find a line like <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
I looked up the Angular CLI's build command, but could find no list of error codes anywhere, so I have no idea what that error code is in the context of ng build
.
The only resources I have been able to find on error code -1073741819
, are related to the Windows UAC settings, specifically that one may need to mess with sound settings or edit the registry...if you've just upgraded from Windows 7 to Windows 10, back from 2015.
Questions:
1. In the context of ng build
, what does error code -1073741819
mean?
2. Is there a list of error codes that the ng build
command can emit anywhere? That might help me answer the first question, but would also be good for general reference.
Upvotes: 2
Views: 7570
Reputation: 6999
Promoting Tom Blodget's correct comment to an answer, -1073741819 is 0xC0000005
which is ERROR_ACCESS_DENIED
.
Upvotes: 1
Reputation: 54811
error MSB3073: The command "npm run build -- --prod" exited with code -1073741819.
The error actually means that npm
exited with that code.
npm will forward the exit code from the scripts it executes, but since it doesn't look like there is any output generated. I would just assume that npm
is failing before it even starts the scripts. You could verify this by changing what the "build" script is doing to something useless like ""
.
With all that said...
1073741819
Is a Windows File System error code.
It's most likely that the hard drive is the point of failure here. Since your builds worked a week ago and have now broken. It's safe to assume you need to replace that HD as soon as you can.
Upvotes: 0