I'm running into some issues building my .net core web api with react frontend. Building and running in development works fine, but I can't seem to create a prod build.
Here's what I've done so far:
On VS Code I run "dotnet publish -c Release -o published" and then "dotnet published/{projectName}.dll" to try to run it. The server starts running, but it doesn't build/run the React.js frontend with the proxy like in development ("dotnet watch run").
On Visual Studio, I right click the solution and hit "Publish to folder". Unfortunately, I keep getting "npm command not found". I've checked my terminal and confirmed that npm is installed. Any ideas why this is happening?
Any help would be very much appreciated.