When running a dotnet .NET Core 6.0 web API from project in pm2 on Ubuntu from the console will work just fine:
Working from console
And running the API from PM2 with pm2 start "dotnet run --project /root/test/MechamedicAPI/MechamedicAPI/MechamedicAPI.csproj --urls http://[site]:5002"
also works:
Working on PM2
But the problem is when I try to run it from a ecosystem.config.js:
Error when running from ecosystem
What I have gathered the problem may be with the environmental variable "version", but I have tried setting it with set version="1.0.0"
to no avail.
I have tried updating the git to the latest version.
I also tried checking the dotnet version is correct, and it is:
I have searched the internet for an answer, but no one seems to have the exact same problem.