madskristensen / WebCompiler

Visual Studio extension for compiling LESS and Sass files
Other
451 stars 172 forks source link

WebCompiler breaking build in Jenkins #433

Open bab5470 opened 5 years ago

bab5470 commented 5 years ago

We've added WebCompiler nuget packages to our project to use locally but now when we try to build in Jenkins the build is broke:

10:59:57 "C:\Program Files (x86)\Jenkins\workspace\Our.Web.csproj" (default target) (34:2) ->
10:59:57 (WebCompile target) -> 
10:59:57   C:\Program Files (x86)\Jenkins\workspace\Content\Less\views\video\view.less : WebCompiler error 0: '"C:\Users\myuser\AppData\Local\Temp\WebCompiler1.12.394\node_modules\.bin\lessc.cmd"' is not recognized as an internal or external command, [C:\Program Files (x86)\Jenkins\workspace\Our.Web.csproj]
10:59:57 C:\Program Files (x86)\Jenkins\workspace\Content\Less\views\video\view.less : WebCompiler error 0: operable program or batch file. [C:\Program Files (x86)\Jenkins\workspace\Our.Web.csproj]

How can we either fix Jenkins to accept WebCompiler or ignore it entirely during builds?

Thanks Brad

michael-magsuci commented 5 years ago

I have the same issue when jenkins run_slave.bat is run via Task Scheduler, but when running run_slave.bat shortcut in the desktop by double click the shortcut, then webcompiler works.

`WebCompiler: Begin compiling compilerconfig.json

C:\Jenkins\workspace\ngDev_MySample-Application_PR-261\src\MySample.Application\wwwroot_src\styles\styles.scss : WebCompiler error 0: module.js:471

[C:\Jenkins\workspace\ngDev_MySample-Application_PR-261\src\MySample.Application\MySample.Application.csproj]

C:\Jenkins\workspace\ngDev_MySample-Application_PR-261\src\MySample.Application\wwwroot_src\styles\styles.scss : WebCompiler error 0: throw err;

[C:\Jenkins\workspace\ngDev_MySample-Application_PR-261\src\MySample.Application\MySample.Application.csproj]`