Closed jrson83 closed 2 years ago
Just to clarify, your error log shows code from hironichu/denosass. This project has nothing to do with that one. That project is a set of Deno bindings for a rewrite of dart-sass, in rust. This project uses dart-sass itself.
Sorry I pasted the wrong error log. Here is the right one. When I try to use @import
or @forward
I'm getting the error:
Error: Error processing page
- page: /styles.scss
- processor:
at (https://deno.land/x/lume@v1.10.0/core/processors.ts:43:19)
at concurrent (https://deno.land/x/lume@v1.10.0/core/utils.ts:23:33)
at async Processors.run (https://deno.land/x/lume@v1.10.0/core/processors.ts:32:7)
at async Site.#buildPages (https://deno.land/x/lume@v1.10.0/core/site.ts:522:5)
at async Site.build (https://deno.land/x/lume@v1.10.0/core/site.ts:438:9)
at async build (https://deno.land/x/lume@v1.10.0/cli/build.ts:36:3)
at async Command.execute (https://deno.land/x/cliffy@v0.24.2/command/command.ts:1275:7)
at async (https://deno.land/x/lume@v1.10.0/cli.ts:173:3)
Caused by : Unsupported operation: 'Uri.base' is not supported
at Object.wrapException (https://esm.sh/v87/sass@1.53.0/deno/sass.js:2:22052)
at Object.Uri_base (https://esm.sh/v87/sass@1.53.0/deno/sass.js:2:99082)
at Object.Style__getPlatformStyle (https://esm.sh/v87/sass@1.53.0/deno/sass.js:2:138470)
at (https://esm.sh/v87/sass@1.53.0/deno/sass.js:238:24244)
at Object.Me.e.<computed> [as $get$Style_platform] (https://esm.sh/v87/sass@1.53.0/deno/sass.js:2:4351)
at (https://esm.sh/v87/sass@1.53.0/deno/sass.js:238:23571)
at Object.Me.e.<computed> [as $get$context] (https://esm.sh/v87/sass@1.53.0/deno/sass.js:2:4351)
at Frame.get$library (https://esm.sh/v87/sass@1.53.0/deno/sass.js:141:164)
at Frame.get$location (https://esm.sh/v87/sass@1.53.0/deno/sass.js:141:436)
at Trace_toString_closure0.call$1 (https://esm.sh/v87/sass@1.53.0/deno/sass.js:141:7980)
Ah. That's the error we get when sass tries to use a Node.js function. Can you show me the stylesheet and config?
Yeah. I created a repo for you here, using lume@v1.10.0, since your repo depends on. Check ./src/styles.scss
.
I got the same error, when I tried to create a lume plugin with original npm sass package from esm.sh/sass@1.53.0. I found this issue on vite, providing a fix, maybe it helps. Thank you.
@jrson83 Thanks so much, that was very helpful. I was able to create another module with a patched version of sass. See https://gitlab.com/binyamin/deno-sass. Also, see https://gitlab.com/binyamin/lume-sass, which uses the patched version.
Awesome! I have tested every functionality, it is working everything as intended. @import
, @use
& @foward
all in combination.
The Lume SASS plugin should be replaced with this one.
Thank you for fixing this so fast! Now it is finally possible to switch from @import
to @use
& @forward
on Deno.
If I run in any issue, I'll let you know.
Since the issue has been completely resolved, I'm closing this in favour of https://gitlab.com/binyamin/lume-sass/-/issues/1
I'm working with Lume and Deno since some days and I'm a bit shocked about the Deno support for SASS, since actually SASS @import support should be deprecated already, but the timeline has been pushed back.
I tried the Lume SASS plugin and your package I found with some luck. But for both I'm getting the Error:
I found this issue on denosass. Is it anyhow possible to fix
@forward
and make it work? Or does these features also not depend ondeno-sass
?