Css VS代码赢得';不要让我用sass编译sass——看
我正在尝试使用终端编译sass。我已经安装了node.js,在使用Live Sass时没有任何问题,但是,每次尝试编译我的Sass时,我都会得到以下结果:Css VS代码赢得';不要让我用sass编译sass——看,css,visual-studio-code,sass,live-sass-compiler,Css,Visual Studio Code,Sass,Live Sass Compiler,我正在尝试使用终端编译sass。我已经安装了node.js,在使用Live Sass时没有任何问题,但是,每次尝试编译我的Sass时,我都会得到以下结果: 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
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
我正在尝试使用@use
,我知道Live Sass编译器不允许我这样做。
我做错什么了吗?或者其他我需要安装的东西?
哦,我已经使用npm安装sass安装了sass。您有两个选项:
"devDependencies": {
"node-sass": "4.5.0"
},
"scripts" : {
"node-sass": "node-sass --output-style compressed -o dist/css src/scss"
}
之后,运行:
npm i;npm run node-sass;
提示:有几种方法可以将SASS与VS代码一起使用。但请确保使用运行
Dart SASS
的最实际版本。要通过NPM安装,请参阅以下信息:
下面是一些关于通过安装VS代码扩展来使用SASS的信息,这可能会使使用它更舒适一些:
我刚刚试过,但它只是给出了一系列错误,老实说,我刚刚开始使用终端或任何比普通HTML和CSS更深的东西。我想安装dart sass,因为Watch sass不允许我使用
@forward
和@use
,而且我知道@import
正在被弃用。还有其他建议吗?