I'm having problems with deploying and running the ReactRedux template on an IIS server which doesn't has nodejs. The app was created using AspNetCore.SpaTemplates' "reactredux" option: https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/
The app is the same as the template, no changes were made. We first tried to host it on IIS with nodejs installed on the IIS server, everything works fine:
screenshot with nodejs
But when we uninstalled nodejs from the server and restarted IIS, it wasn't working anymore:
screenshot without nodejs
We couldn't figure out what the error is because running it in development mode requires nodejs and when we run it with dotnet run
in development mode the error message complains about node.js not being installed, as expected.
We tried to deploy the app running:
$Env:ASPNETCORE_ENVIRONMENT = "Production"
dotnet publish -c Release
and using Visual Studios build>publish
interface.
Acording to the docs here, the app shouldn't need nodejs when its deployed for production:
https://docs.microsoft.com/en-us/aspnet/core/spa/react?tabs=visual-studio
Unlike the development build, the production build doesn't require Node.js to be installed on the server.
I'm new to asp.net and deploying apps on IIS, maybe the solution is trivial but we couldn't manage to solve this, thanks in advance.