johan-v-r / LibSassBuilder

Sass builder for .NET projects
MIT License
99 stars 14 forks source link

Any way to get LibSassBuilder to work on the M1 processor? #42

Open jostFT opened 2 years ago

jostFT commented 2 years ago

Heya, I upgraded to an M1 processor, and now I'm getting build errors. /Users/jost/.nuget/packages/libsassbuilder/1.6.4/build/LibSassBuilder.targets(90,5): error MSB3073: The command "dotnet "/Users/jost/.nuget/packages/libsassbuilder/1.6.4/build/../tool/LibSassBuilder.dll" files "/Users/jost/Desktop/FT/ver/ver-self-service-portal/src/FaroeseTelecom.Ver.Web/wwwroot/css/styles.scss" --outputstyle expanded --level verbose " exited with code 130. [/Users/jost/Desktop/FT/ver/ver-self-service-portal/src/FaroeseTelecom.Ver.Web/FaroeseTelecom.Ver.Web.csproj]

I am currently running libsassbuilder 1.6.4. I found that I can upgrade, but then I'm simply told that libsasshost does not support the arm64 architecture.

I have tried a million different combinations (such as this dotnet/sdk thread), but to no avail

Do you know of a way? :)

jostFT commented 2 years ago

forgot to mention that a vanilla project works perfectly fine with the adjustments suggested by the issue

jostFT commented 2 years ago

Nevermind, I have switched to DartSassBuilder. That fixed all my problems :) I've been lead to believe that this library will be deprecated, and replaced with the DartSassBuilder.

I merely replaced the LibSassBuilder in the .csproj file, with the DartSassBuilder:

<PackageReference Include="DartSassBuilder" Version="0.2.1-beta" />

and it just worked with no issues :)

ChristianWeyer commented 2 years ago

Hi @jostFT - interesting.

@johan-v-r I am still having issues with LibSaasBuilder on my M1 ARM MacBook Pro.

Error: /Users/xyz/.nuget/packages/libsassbuilder/2.0.1/build/LibSassBuilder.targets(95,5): error MSB3073: The command "dotnet "/Users/xyz/.nuget/packages/libsassbuilder/2.0.1/build/../tool/LibSassBuilder.dll" files "/Users/xyz/Sources/blazor-wasm-things-to-know/IsolatedJS/Client/Shared/MainLayout.razor.scss" --outputstyle compressed --level default " exited with code 134.

But, I am not successful with DartSassBuilder, either. It just does not compile my .scss files at all. But no error...

Any ideas?

mrlife commented 2 years ago

@jostFT I switched to DartSassBuilder and added Microsoft.ClearScript.V8.Native.osx-arm64 for it to compile without error. Is your setup compiling SASS into CSS files? Mine runs without error with these 2 packages but does not update CSS files when SASS files are changed.

jostFT commented 2 years ago

@mrlife @ChristianWeyer, hey sorry. Firstly, my inbox decided this was spam for some reason, so sorry for the late reply.

Secondly, I assumed it worked, but it turned out that that it had cached my previously compiled .css file. I also tried WebCompiler - but it is very indecisive if it should work or not. Sometimes it compiles it perfectly, and then at other times it decides that it does not support the arm architecture.

So currently I am at a loss. Even with installing the Microsoft.ClearScript.V8.Native.osx-arm64 package, it proceeds to complain about it not existing.