Skip to content

Error trying to use "~/" for pathing #54

Open
@s3YwCf2ZbfJG4SHAfjQMAjtsf

Description

Switching "~/" to "../../" worked.

Is there an option that allows the use of "~/"? It worked with other LibSass in my .Net 4.8 project.

Thanks, just curious.

Peter

2022-07-17 08:26:08,782 [6] ERROR Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request.
DartSassHost.SassCompilationException: Error: Can't find stylesheet to import.
at Content/css/Site.scss:1:9 -> @import "~/ci/styles/fonts.scss";

Description: Can't find stylesheet to import.
File: C:\Projects....\Content\css\Site.scss
Line number: 1
Column number: 9
Source fragment:

Line 1: @import "~/ci/styles/fonts.scss";
----------------^
Line 2: @import "styles/base/elements.scss";
at DartSassHost.JsonConverters.CompilationResultConverter.ReadResult(Utf8JsonReader& reader)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at DartSassHost.SassCompiler.CompileFile(String inputPath, String outputPath, String sourceMapPath, CompilationOptions options)
at WebOptimizer.Sass.Compiler.ExecuteAsync(IAssetContext context)
at WebOptimizer.Asset.ExecuteAsync(HttpContext context, IWebOptimizerOptions options)
at WebOptimizer.AssetBuilder.BuildAsync(IAsset asset, HttpContext context, IWebOptimizerOptions options)
at WebOptimizer.AssetMiddleware.HandleAssetAsync(HttpContext context, IAsset asset, WebOptimizerOptions options)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions