question

SaeedPooladzadeh-4680 avatar image
0 Votes"
SaeedPooladzadeh-4680 asked Bruce-SqlWork edited

Problem with react and ASP.net Core Template

Hello,

In the visual studio, there is a template for react and ASP.net Core?
Can I use the new version of react (function base) in this template?

When I try to use it, after debugging I encounter this error!




 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 create-react-app server was listening for requests. The error output was: ))
 System.Threading.Tasks.Task<TResult>.GetResultCore(bool waitCompletionNotification)
    
 InvalidOperationException: The npm script 'start' exited without indicating that the create-react-app server was listening for requests. The error output was:
 Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer.ReactDevelopmentServerMiddleware.StartCreateReactAppServerAsync(string sourcePath, string scriptName, string pkgManagerCommand, int portNumber, ILogger logger, DiagnosticSource diagnosticSource, CancellationToken applicationStoppingToken)




thanks,

Saeed



dotnet-aspnet-core-webapi
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered Bruce-SqlWork edited

there is no issue with upgrading the template to use newer react or newer syntax, I do it all the time. takes just a couple minutes to convert all the code to usestate and functions.

you should manually run npm start or npm run build to see the error(s).

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.