I have an ASP.NET Core project that includes several TypeScript files. The project has Microsoft.TypeScript.MSBuild reference to automatically compile these TS files to JavaScript files.
<ItemGroup>
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="3.2.3" />
</ItemGroup>
The setting worked until I tried to dockerize my project. When I follow the example here, the error occurs:
/root/.nuget/packages/microsoft.typescript.msbuild/3.2.3/tools/Microsoft.TypeScript.targets(305,5): error MSB6003: The specified task executable "node" could not be run. No such file or directory [/app/MyProject.csproj] The command '/bin/sh -c dotnet publish -c Release -o out' returned a non-zero code: 1
How to resolve the issue?