-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Service Fabric ASP.NET Core React application does not run #35458
Comments
@huwjeffries thanks for contacting us. If you are targeting .NET Framework 4.8, can you confirm that you are trying to create an ASP.NET Core 2.1 app? No other ASP.NET Core version supports .NET Framework (classic). I don't think this is an scenario we've covered in the past, so it is unlikely the templates work. It'll be easier for you to switch to the current best practices approach recommended by SPA frameworks to integrate with different backends. ASP.NET Core in 6.0 will be doing exactly that, so you can create a template for 6.0 and follow the same approach outlined there in your app. |
Hi there, thanks for your reply. Service Fabric 8 has full support for running .net 5. In fact it was the number 1 key feature of the release notes: If you scroll down a little further to "Current Breaking Changes" you'll see that customers must target at least .net core 3.1 for the hosted service. Service fabric itself (the sfproj) must always run a full .net framework, but that does not limit the hosted service. Please could you investigate further, as I think there is definitely an issue? Thanks. |
@masnider can you help look at this? |
@huwjeffries thanks for the additional details. We didn't have the full picture, that's why we were asking for details. Seems like @davidfowl has already looped in the right folks. |
Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue. This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue! |
VS2019 version: 16.11.1
Node version: 14.17.5
NPM version: 6.14.14
Service Fabric SDK: 5.1.321.9590 (latest at time of writing)
Steps to re-create the issue:
Launch Visual Studio 2019 and click "Create New Project"
Select "Service Fabric Application" and click "Next"
On the next screen select .NET Framework 4.8 and click the "Create" button
On the next screen select "Stateless ASP.NET Core" and click the "Create" button.
A popup will appear asking which type of ASP.NET core app you'd like to create. Select "ASP.NET Core with React.js".
Click the "Create" button.
[If you've installed the service fabric SDK for the first time, find the icon for it in the system tray, right click on it and setup a 1 node cluster - takes a few minutes to become ready.].
After the project has been created and your local service fabric cluster has started, click the "Start" button in Visual Studio (or press F5) to launch the project.
After a lengthy pause, a browser window will open showing the following error:
The text of this error is as follows:
`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: Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'
Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'
))
System.Threading.Tasks.Task.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: Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'
Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'
Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer.ReactDevelopmentServerMiddleware.StartCreateReactAppServerAsync(string sourcePath, string scriptName, string pkgManagerCommand, int portNumber, ILogger logger, DiagnosticSource diagnosticSource, CancellationToken applicationStoppingToken)
Stack Query Cookies Headers Routing
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: Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' ))
System.Threading.Tasks.Task.GetResultCore(bool waitCompletionNotification)
System.Threading.Tasks.Task.get_Result()
Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions.WithTimeout(Task task, TimeSpan timeoutDelay, string message)
Microsoft.AspNetCore.SpaServices.Extensions.Proxy.SpaProxy.PerformProxyRequest(HttpContext context, HttpClient httpClient, Task baseUriTask, CancellationToken applicationStoppingToken, bool proxy404s)
Microsoft.AspNetCore.Builder.SpaProxyingExtensions+<>c__DisplayClass2_0+<b__0>d.MoveNext()
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Show raw exception details
InvalidOperationException: The npm script 'start' exited without indicating that the create-react-app server was listening for requests. The error output was: Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'
Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer.ReactDevelopmentServerMiddleware.StartCreateReactAppServerAsync(string sourcePath, string scriptName, string pkgManagerCommand, int portNumber, ILogger logger, DiagnosticSource diagnosticSource, CancellationToken applicationStoppingToken)`
I've verified this problem exists on two different computers. We see the same behaviour if you select "ASP.NET Core with React.js and Redux" in the final step of the project creation.
The text was updated successfully, but these errors were encountered: