aspnetcore-angular-universal | NET Core & Angular Universal advanced starter | Server Side Rendering library
kandi X-RAY | aspnetcore-angular-universal Summary
kandi X-RAY | aspnetcore-angular-universal Summary
This repository is maintained by Trilon.io and the Angular Universal team and is meant to be an advanced starter for both ASP.NET Core 2.1 using Angular 7.0+, not only for the client-side, but to be rendered on the server for instant application paints (Note: If you don't need SSR read here on how to disable it). This is meant to be a Feature-Rich Starter application containing all of the latest technologies, best build systems available, and include many real-world examples and libraries needed in todays Single Page Applications (SPAs).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aspnetcore-angular-universal
aspnetcore-angular-universal Key Features
aspnetcore-angular-universal Examples and Code Snippets
Community Discussions
Trending Discussions on aspnetcore-angular-universal
QUESTION
The original code running on ASP.Net Core 2.2 (upgraded from 2.1) didn't have start in package.json.
https://github.com/TrilonIO/aspnetcore-angular-universal/blob/master/package.json
When updating to ASP.Net Core 3.0, it is now looking for start script.
Why is it looking for start now?
---> 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! missing script: start
This is what is in the log:
0 info it worked if it ends with ok 1 verbose cli [ '/project/.nvm/versions/node/v10.8.0/bin/node', 1 verbose cli
'/project/.nvm/versions/node/v10.8.0/bin/npm', 1 verbose cli 'run', 1 verbose cli 'start', 1 verbose cli '--', 1 verbose cli
'--port', 1 verbose cli '54294' ] 2 info using npm@6.4.1 3 info using node@v10.8.0 4 verbose stack Error: missing script: start 4 verbose stack at run (/project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/lib/run-script.js:155:19) 4 verbose stack at /project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/lib/run-script.js:63:5 4 verbose stack at /project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:115:5 4 verbose stack at /project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:418:5 4 verbose stack at checkBinReferences_ (/project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:373:45) 4 verbose stack at final (/project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:416:3) 4 verbose stack at then (/project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:160:5) 4 verbose stack at ReadFileContext. (/project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:332:20) 4 verbose stack at ReadFileContext.callback (/project/.nvm/versions/node/v10.8.0/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16) 4 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:233:13) 5 verbose cwd /project/Dropbox/Workspace/MyProject/src/MyProject.Web/ClientApp 6 verbose Darwin 19.0.0 7 verbose argv "/project/.nvm/versions/node/v10.8.0/bin/node" "/project/.nvm/versions/node/v10.8.0/bin/npm" "run" "start" "--" "--port" "54294" 8 verbose node v10.8.0 9 verbose npm v6.4.1 10 error missing script: start 11 verbose exit [ 1, true ]
This is what is reported on the console:
...---> 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.Task
1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task
1.get_Result() at Microsoft.AspNetCore.SpaServices.AngularCli.AngularCliMiddleware.<>c.b__2_0(Task1 task) at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace --- at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task
1.get_Result() at Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions.WithTimeout[T](Task1 task, TimeSpan timeoutDelay, String message) at Microsoft.AspNetCore.SpaServices.Extensions.Proxy.SpaProxy.PerformProxyRequest(HttpContext context, HttpClient httpClient, Task
1 baseUriTask, CancellationToken applicationStoppingToken, Boolean proxy404s) at Microsoft.AspNetCore.Builder.SpaProxyingExtensions.<>c__DisplayClass2_0.d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi) fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLS17GG2QFU7", Request id "0HLS17GG2QFU7:00000001": An unhandled exception was thrown by the application. 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! missing script: start
ANSWER
Answered 2019-Dec-18 at 03:05When updating to ASP.Net Core 3.0, it is now looking for start script.
In my opinion,it is always necessary if you start with only dotnet run
for an integrated angular + asp.net core project.
You need to configure spa.UseAngularCliServer(npmScript: "start");
to run angular
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aspnetcore-angular-universal
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page