title: AggregateException: One or more errors occurred. (One or more errors occurred. (Failed to start 'npm'. To resolve this:
body: <p>Visual studio on mac with docker is having lots of error getting frustration . I, have a project on asp.net core 2.1 with angular 6 on docker image. When The project is successfully builded but not able to run below is the details : </p>
  
  <p><strong>An unhandled exception occurred while processing the request.
  AggregateException: One or more errors occurred. (One or more errors occurred. (Failed to start 'npm'. To resolve this:.
  <a href="https://i.stack.imgur.com/Dcump.png" rel="noreferrer">1</a> Ensure that 'npm' is installed and can be found in one of the PATH directories.
  Current PATH enviroment variable is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  Make sure the executable is in one of those directories, or update your PATH.
  <a href="https://i.stack.imgur.com/Bgu7R.png" rel="noreferrer">2</a> See the InnerException for further details of the cause.))
  System.Threading.Tasks.Task.GetResultCore(bool waitCompletionNotification)
  InvalidOperationException: Failed to start 'npm'. To resolve this:.
  <a href="https://i.stack.imgur.com/Dcump.png" rel="noreferrer">1</a> Ensure that 'npm' is installed and can be found in one of the PATH directories.
  Current PATH enviroment variable is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  Make sure the executable is in one of those directories, or update your PATH.
  <a href="https://i.stack.imgur.com/Bgu7R.png" rel="noreferrer">2</a> See the InnerException for further details of the cause.
  Microsoft.AspNetCore.NodeServices.Npm.NpmScriptRunner.LaunchNodeProcess(ProcessStartInfo startInfo)</strong>  </p>
  
  <p><a href="https://i.stack.imgur.com/Dcump.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Dcump.png" alt="info for details"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Bgu7R.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bgu7R.png" alt="added more image"></a></p>
  
  <pre><code>services.AddNodeServices(options =&gt;
              {
                  options.ProjectPath = "/Library/Frameworks/Mono.framework/Commands:/Applications/Visual Studio.app/Contents/Resources:/Applications/Visual Studio.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/usr/local/bin/";
              });
  </code></pre>
  
  <p>Here is the docker file info </p>
  
  <pre><code>FROM microsoft/dotnet:2.1-sdk AS base
  WORKDIR /app
  EXPOSE 80
  
  FROM microsoft/dotnet:2.1-sdk AS build
  WORKDIR /src
  COPY MeroRentalDev.sln ./
  COPY WebApp/WebApp.csproj WebApp/
  RUN dotnet restore -nowarn:msb3202,nu1503
  COPY . .
  WORKDIR /src/WebApp
  RUN dotnet build -c Release -o /app
  
  FROM build AS publish
  RUN dotnet publish -c Release -o /app
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app .
  ENTRYPOINT ["dotnet", "WebApp.dll"]
  </code></pre>
  
  <p>Tried many solution for the link but not able to solve 
  <a href="https://stackoverflow.com/questions/50505974/system-aggregation-exception-failed-to-start-node-process">System Aggregation Exception : Failed to start Node Process</a></p>
  
  <p><a href="https://stackoverflow.com/questions/44635280/microsoft-aspnetcore-nodeservices-failed-to-start-node-process">Microsoft.AspNetCore.NodeServices: Failed to start node process</a></p>
  
  <p><a href="https://github.com/aspnet/JavaScriptServices/issues/227" rel="noreferrer">https://github.com/aspnet/JavaScriptServices/issues/227</a></p>
  
  <p><a href="https://github.com/aspnet/JavaScriptServices/issues/707" rel="noreferrer">https://github.com/aspnet/JavaScriptServices/issues/707</a></p>