DEV Community

Discussion on: Build an Angular 8 App with REST API and ASP.NET Core 2.2 - part 2

Collapse
 
ashiarush profile image
ashiarush

Please provide solution for the same.
I have tried all the options but did not work.

Getting this error while executing with Visual studio 2017(F5)

Collapse
 
jonbrownnhti profile image
JonBrownNHTI

spa.Options.SourcePath = "ClientApp";

This could be your problem. If you want just give it the full path like:

spa.Options.SourcePath = @"C:\'PATH TO CLIENTAPP';

Thread Thread
 
ashiarush profile image
ashiarush

Yes it worked but I think its not the good way to give full path.

Is there anyother way to give just the relative path.

Thanks in advance.

Thread Thread
 
jonbrownnhti profile image
JonBrownNHTI

I agree. This was just a quick fix so you could test. Where is your ClientApp folder?

var path = Path.Combine(Directory.GetCurrentDirectory(), "ClientApp");

spa.Options.SourcePath = path;

Collapse
 
dileno profile image
Martin Soderlund Ek • Edited

In VS 2019 you can add path to your nodejs installation manually. Hope you find the screenshot helpful! thepracticaldev.s3.amazonaws.com/i...

I don't use VS 2017 any more but External Web Tools should be easy to find via Tools -> Options as well.

Thread Thread
 
ashiarush profile image
ashiarush

Thanks