C
C#2y ago
Metalkon

❔ Cannot Run A New Project (Angular + ASP.NET Web API)

I'm trying to follow a gifted course that teaches how to make a full stack application using asp.net web api and angular 14 but I cannot get beyond the first section as my freshly made default project doesn't want to run and I just get these kinds of errors in the picture. I have no idea where I should even begin to troubleshoot this problem and i'm wondering if anyone can give me some advice on what I should try to do? I have no experience working with anything frontend related other than some basic blazor so this stuff is completely unfamiliar to me.
9 Replies
Metalkon
MetalkonOP2y ago
Metalkon
MetalkonOP2y ago
It's simply a default unchanged "ASP.NET Core with Angular" project type running on .NET 6. Nodejs was installed with default settings before making the project.
rgborges
rgborges2y ago
Hi, I recently had to create a asnet core app with angular for my studies here, the problem I had here in the default project was that I wasn't setted the ASPNETCORE_ENVIRONMENT global variable and didn't build the project before I run for the first time. But keep in mind I'm using LInux environment, so not sure if it's gonna work with you
Metalkon
MetalkonOP2y ago
things totally changed doing a build first, though im unfamiliar with this global variable your talking about
Metalkon
MetalkonOP2y ago
wasnt getting to that page in the browser before, and getting a different error in console window
rgborges
rgborges2y ago
Did you try run ng serve inside ClientApp folder and see if the same error is showed up? Because I’m this initials steps dotnet runs a script that calls ng serve for a specified port.. then the aspnet use a redirect page to proxy you to angular application
Metalkon
MetalkonOP2y ago
dont see anything named that
rgborges
rgborges2y ago
Just open your terminal, navigate until ClientApp folder and run ng serve .. you need to install @angular/cli npm package
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server