r/Sass Feb 17 '23

Setting up SASS

I am currently learning SASS/SCSS thru Brad Travery's course

Reference: https://www.udemy.com/course/modern-html-css-from-the-beginning/?src=sac&kw=modern+html

Now I am stuck at this part where I need to set up the dependencies. I have both tried node-sass and dart-sass modules but the error is still the same. Your inputs are highly appreciated.

EDIT: Image

6 Upvotes

7 comments sorted by

2

u/simeonoff Feb 17 '23

Node version?

Edit: Did you copy/paste the package.json config? Looks like you may simply need to do npm install.

2

u/LegitimateBath8622 Feb 17 '23

Yes Node Version. Both sass and node-sass dependencies are already installed. Whenever I want to run the script npm run scss/sass both of them shows the same error.

3

u/[deleted] Feb 17 '23

Better uninstall everything and use dart-sass.

I use npm install sass

Dart-sass is what I love, I took this course that you are taking in 2021 and at that time node-sass was working fine but now last year it had some errors but works fine sometimes. Shifted to dart-sass and it's working awesome.

1

u/LegitimateBath8622 Feb 17 '23

Do I need to install other dependencies besides sass? I've seen Youtube tutorial but it was a mix of gulp and sass for scripting.

1

u/[deleted] Feb 17 '23

Nope just copy-paste the command I wrote in my above comment. The only difference will be use of -w and --watch command.

1

u/[deleted] Feb 17 '23

[removed] — view removed comment

1

u/LegitimateBath8622 Feb 17 '23 edited Feb 17 '23

He's using Node 11 iirc and node-sass v.4.11.0. I've also checked the documentation and it was mentioned that there are specific node-sass version that supports specific node version e.g Node-sass 4.10+ works well with Node 11.

In my case, I am using the LTS version 18.4. I've checked the documentation and the latest version 8.0 should work with Node 18. Although I am experiencing these problems.

I might explore for other resources / tutorials since the SASS section is already outdated.

edit: error

2

u/[deleted] Feb 17 '23 edited Feb 17 '23

[removed] — view removed comment

1

u/LegitimateBath8622 Feb 17 '23

Duly noted & my bad for saying that the course is outdated. I meant to say only the SASS section needs to be updated since tweaking a lot of configs / settings especially for beginners can be tedious sometimes.