Hi,
I created new application in .Net core and Angular JS. I did on click publish to IIS server, it is not working.
I am getting the below mentioned error.
project structure
My deployment folder
Raw error detail:
System.AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json']
)) ---> System.AggregateException: One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json']
) ---> System.InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json']
---> System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(String sourcePath, String npmScriptName, ILogger logger)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(String sourcePath, String npmScriptName, ILogger logger)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.<>c.<Attach>b__2_0(Task
1 task)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions.WithTimeoutT
at Microsoft.AspNetCore.Builder.SpaProxyingExtensions.<>c__DisplayClass2_0.<
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Flex.EQ.UI.Startup.<>c__DisplayClass5_0.<
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json']
) ---> System.InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json']
---> System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(String sourcePath, String npmScriptName, ILogger logger)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(String sourcePath, String npmScriptName, ILogger logger)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.<>c.<Attach>b__2_0(Task
1 task)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
---> (Inner Exception #0) System.InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open 'D:\EQ\UI\node_modules\start\package.json']
---> System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(String sourcePath, String npmScriptName, ILogger logger)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(String sourcePath, String npmScriptName, ILogger logger)<---
<---
I got the same issue ? did we find any solution ?
I am also facing the same. Please post the solution if you got this solved.
SAME ISSUE :(
Hello Guys,
I spent few days behind this and finally got solved. Since i am a newbie to angular this helped to learn many things. :).
So my problem was actually the root path of Static files was different on Startup class.
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/dist/ClientApp";
});
First you need to check the out path in your angular.json file
"outputPath": "dist/ClientApp",
and put the same in Startup class static file root path.
And mainly about the error, actually this error message is nothing related to our actuall error message. While deploying our application to a server already the all npm/ng build activities are done and VS will copy those file to the server.
But if we have enabled the asp.net core environment as development mode in server then the following code will get executed in startup class.
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "start");
}
which shouldn't happen in server. So if you guys are deploying this application in development mode to server, try to comment out this line, then only you will get to know the actual error.
So .net is actually using this npm start(ng serve) to run the application in your local machine
https://stackoverflow.com/questions/52724294/how-to-solve-the-npm-script-start-exited-without-indicating-that-the-angular-c
i posted here today .. but no one reply my error.. please check
https://stackoverflow.com/questions/52714606/an-unhandled-exception-occurred-while-processing-the-request-in-netcore
i am facing these error on my different machine.... i spend 9 hours in this issue but still pending both of these
An unhandled exception occurred while processing the request.
AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42)
at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
))
System.Threading.Tasks.Task
InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42)
at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(string sourcePath, string npmScriptName, ILogger logger)
Stack Query Cookies Headers
AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'. at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42) at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27) at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18) at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26) at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21) at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26) at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
))
System.Threading.Tasks.Task
Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions.WithTimeout
Microsoft.AspNetCore.SpaServices.Extensions.Proxy.SpaProxy.PerformProxyRequest(HttpContext context, HttpClient httpClient, Task
Microsoft.AspNetCore.Builder.SpaProxyingExtensions+<>c__DisplayClass2_0+<
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Show raw exception details
InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'. at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42) at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27) at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18) at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26) at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21) at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26) at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(string sourcePath, string npmScriptName, ILogger logger)
Show raw exception details
please can anyone help me
An unhandled exception occurred while processing the request.
AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42)
at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
))
System.Threading.Tasks.Task
InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42)
at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18)
at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(string sourcePath, string npmScriptName, ILogger logger)
Stack Query Cookies Headers
AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'. at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42) at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27) at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18) at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26) at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21) at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26) at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
))
System.Threading.Tasks.Task
Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions.WithTimeout
Microsoft.AspNetCore.SpaServices.Extensions.Proxy.SpaProxy.PerformProxyRequest(HttpContext context, HttpClient httpClient, Task
Microsoft.AspNetCore.Builder.SpaProxyingExtensions+<>c__DisplayClass2_0+<
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Show raw exception details
InvalidOperationException: The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'. at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42) at MergeMapSubscriber._tryNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:69:27) at MergeMapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:59:18) at MergeMapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MergeMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:92:26) at InnerSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\InnerSubscriber.js:28:21) at InnerSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at MapSubscriber._next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\map.js:55:26) at MapSubscriber.Subscriber.next (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Subscriber.js:67:18) at SwitchMapSubscriber.notifyNext (C:\Users\narender\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\switchMap.js:86:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve "--port" "64382"
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(string sourcePath, string npmScriptName, ILogger logger)
Show raw exception details
Thanks for contacting us, @SARAVANA1501.
We're closing this issue as a solution has been provided by @boonmathew.
@NarenderSiri looks like you're facing some other issue. We recommend using StackOverflow for getting help with your issue, as looking at the error it seems to be your app related Data path ".builders['app-shell']" should have required property 'class'.
Most helpful comment
Hello Guys,
I spent few days behind this and finally got solved. Since i am a newbie to angular this helped to learn many things. :).
So my problem was actually the root path of Static files was different on Startup class.
services.AddSpaStaticFiles(configuration => { configuration.RootPath = "ClientApp/dist/ClientApp"; });
"outputPath": "dist/ClientApp",
And mainly about the error, actually this error message is nothing related to our actuall error message. While deploying our application to a server already the all npm/ng build activities are done and VS will copy those file to the server.
But if we have enabled the asp.net core environment as development mode in server then the following code will get executed in startup class.
if (env.IsDevelopment()) { spa.UseAngularCliServer(npmScript: "start"); }
which shouldn't happen in server. So if you guys are deploying this application in development mode to server, try to comment out this line, then only you will get to know the actual error.
So .net is actually using this npm start(ng serve) to run the application in your local machine