i'm learning html and i'm in the very beginning. i've written this variables.scss file and trying to turn css file. this is what i wrote to VS Code terminal: sass variables.scss:variables.css
and this is my error msg:
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 variables.scss:variables.css
~~~~
CategoryInfo : ObjectNotFound: (sass:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
i said okey, i just need to install sass i guess and write to the terminal: npm install -g node-sass
npm : The term 'npm' 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
npm install -g node-sass
~~~
CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
sooo i have no idea what should i do or not (i tried other stuff also end up error msgs)
trying to variables.scss to turn css file.
CodePudding user response:
- First, you need to download and install Node.js.
- Second, ensure the path to the executable has been added to your environment variables.
- You may need to restart your computer after this for the changes to take effect.
- Run
npm install -g sass
in the terminal. - Run
sass variables.scss variables.css
in the terminal.
CodePudding user response:
As you are a beginner, you need to have best practices for use SASS in a projet. First of all, click NodeJS to dowload it. Next, to properly install SASS, here are some steps :
- Open your terminal in VSCode and write : npm install -g sass.
- Look for the Live Sass Compiler (Glenn Marks) extension.
- Initialize a package.json file : npm init
Finally, click SASS to learn more about it.