0

I have installed service fabic locally for testing. As a dummy first run I have simply created a single c# app with angular front end. Zero changes. Out the box.

When I run it I get the following.

    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: 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<TResult>.GetResultCore(bool waitCompletionNotification)

InvalidOperationException: The npm script 'start' exited without indicating that the Angular CLI 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.AngularCli.AngularCliMiddleware.StartAngularCliServerAsync(string sourcePath, string scriptName, string pkgManagerCommand, int portNumber, ILogger logger, DiagnosticSource diagnosticSource, CancellationToken applicationStoppingToken)

I can run the same template project out of service fabric. And on my machine in general. So does anyone know why this is the case here.

Aaron Gibson
  • 1,280
  • 1
  • 21
  • 36
  • it sounds like a permissions problem, maybe this link can help https://stackoverflow.com/questions/34600932/npm-eperm-operation-not-permitted-on-windows – Juan Oct 28 '21 at 14:36

1 Answers1

0

To solve this issue, we must use the workarounds listed below.

Set your environment to Production and see what happens. As of your error i believe that it has something to do with attempting an NPM start.

<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />

& For more information please refer the below links-

SO thread : EPERM: Operation not permitted & Npm install angular/cli error EPERM Operation not permitted

GitHub issue : Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15