TimeoutException: The Angular CLI process did not start listening for requests within the timeout period
ASP.NET Core >= 3.0
If you are using asp.net core 3.0 then you should not use UseAngularCliServer
instead. You should use asp.net as a proxy for development. more detail is here
app.UseSpa(spa => { spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { spa.UseProxyToSpaDevelopmentServer("http://localhost:4200"); } });
open command widnow, go to ClientApp and start npm server.
c:\your\project\directory\> cd ClientAppc:\your\project\directory\> npm start
ASP.NET Core 2.0
refresh(F5)
your browser or increase timeout for SPA configuration
app.UseSpa(spa => { spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { spa.UseAngularCliServer(npmScript: "start"); spa.Options.StartupTimeout = TimeSpan.FromSeconds(200); // <-- add this line } });
In the development environment, npm builds an angular app before serving. some times build takes longer than 120 seconds.