Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@use is coming soon, but it's not supported in this version of Dart Sass

I am running ng serve with an Angular cli project which includes Sass. I have been using @import and @include with no problem, when I added @use, the terminal throws:

@use is coming soon, but it's not supported in this version of Dart Sass.

My package.json uses "sass": "1.25.0", which according to the official documentation, @use has been supported since 1.23.

Is there something I'm missing?

UPDATE: I see that Angular lists Sass as a dependency in package-lock.json but with an older version. How can I make it to match the package.json version? I tried changed manually, run npm i --save but then package-lock.json reverts to the older version.

UPDATE 2 - Feb 2020: Even both package-lock.json and package.json show that use a 1.25.0 version of Sass, still can't use @use

like image 942
vester Avatar asked Dec 05 '25 03:12

vester


2 Answers

Take a look at using package overrides in the npm docs Another option is using patch-package

Add the following to your package.json

{
  "overrides": {
    "sass": "1.57.1"
  }
}
like image 80
BenH Avatar answered Dec 07 '25 18:12

BenH


If you want to use @use, then go to package.json and update dart-sass

{
    "dart-sass": "^1.25.0"
}
like image 20
Rstar37 Avatar answered Dec 07 '25 18:12

Rstar37



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!