# ASP.NET Core 2.2 and Angular template with monorepo

The template’s default structure has everything in one place, like this:

/
bin/
obj/
ClientApp/
myproject.csproj
Startup.cs
etc.


My structure has many libraries and angular apps – i.e. a monorepo – so it must be more organized:

/
libs
client
client2
server
bin/
obj/
myproject.csproj
Startup.cs
lib1
lib2


I edited various references to reflect this structure, most importantly Startup.cs:

services.AddSpaStaticFiles(configuration => {
configuration.RootPath = "../../../../client/dist";
});

// and

app.UseSpa(spa => {
spa.Options.SourcePath = "../../../../client";
});


But when running I get: InvalidOperationException: Failed to start 'npm'.

When I run the server and client separately, they work… so the problem is with how the “spa services” is configured. I tried both ../../../../client (from bin directory) and ../client (from server project’s base directory).

How do I reconfigure the project structure? (Is there a working sample repo somewhere?)

Source: AngularJS