cssvisual-studio-codesasslive-sass-compiler

VS Code won't let me compile sass using sass --watch


I'm trying to compile sass using the terminal. I already installed node.js, and I didn't have any problem when using Live Sass, however, every time I try to compile my sass I get this:

sass : The term 'sass' is not recognized as the name of a cmdlet, function, script file, or operable program.     
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ sass -watch scss:css
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (sass:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I'm trying to use @use and I know the Live Sass compiler won't let me do that. Is there anything I'm doing wrong? Or something else that I need to install? Oh, I already installed sass using npm install sass.


Solution

  • Head up: there are several way to use SASS with VS Code. But make sure to use the most actual version running with Dart SASS. To install that via NPM here are some information:

    Is it better to use the Live Sass Compiler (VS Code extension) or to install and run Sass via npm? (+ tips how to change from node-sass to dart-sass)

    And here are some information about using SASS by installing an VS Code Extension which maybe makes it a little bit mor comfortable to use it:

    Live Sass Compiler - @use causes compilation error