excubo-ag / WebCompiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The command "dotnet tool run webcompiler" exited with code 1 in github workflow but no usefull error

Liero opened this issue · comments

Hi,

I have added following target to my .csproj:

  <Target Name="CompileStaticAssets" AfterTargets="AfterBuild">
    <Exec Command="dotnet tool run webcompiler -c webcompilerconfiguration.json -f webcompilerfiles.conf" StandardOutputImportance="high" />
  </Target>

It works locally, but it suddenly stopped working in my github actions (it was working previously):

 CompileStaticAssets:
         dotnet tool run webcompiler -c webcompilerconfiguration.json -f webcompilerfiles.conf
         Expected expression, found '$'
         Expected expression, found '$'
         Expected expression, found '$'
         Expected expression, found '$'
     2>/home/runner/work/vNext.BlazorComponents/vNext.BlazorComponents/BlazorComponents/vNext.BlazorComponents.csproj(49,5): error MSB3073: The command "dotnet tool run webcompiler -c webcompilerconfiguration.json -f webcompilerfiles.conf" exited with code 1.

It does not provide any useful error message, nor the source of the error.

Entire github actions log can be found here, including souce codes

I'm using v2.6.6., see log

Hi @Liero,

this points towards an error within a compilation process, not in this project. Let me see whether I can provide more information about the source of the error. In any case, I'd recommend you to always upgrade to the most recent release, as it is regularly updated whenever one of the libraries receives an update.

BR
Stefan

Hi @Liero,

I've just pushed a new version (2.7.0) which should improve error source information. Please test your workflow with this version.

BR
Stefan

This is very likely to be a nuget cache issue. dotnet restore knows --no-cache, but unfortunately dotnet tool doesn't yet (dotnet/sdk#9577, just as dotnet new doesn't dotnet/templating#2874). IIRC the cache lasts 30 minutes, so you should be fine within a few minutes.

Thanks. The error output is now crystal clear. perfect.

dotnet tool run webcompiler -c webcompilerconfiguration.json -f webcompilerfiles.conf
Expected expression, found '$'
-- in file wwwroot\SimpleGrid.css L5:23
Expected expression, found '$'
-- in file wwwroot\SimpleGrid.css L6:26
Expected expression, found '$'
-- in file wwwroot\SimpleGrid.css L7:26
Expected expression, found '$'
-- in file wwwroot\SimpleGrid.css L8:29

I my case there was a breaking change in recent sass compiler and on my local env I've been using older version.

Not sure why dotnet prefered global installed package over local package in dotnet-tools.json.