0

I am trying to work with SCSS and compile it as CSS in WebStorm, so I set a file watcher for that but unfortunate I got this error:

Failed to run File Watcher 'SCSS'.
            The watcher has been disabled.
            Error: Invalid executable

So I google it and I found out that there as some steps that needs to be done first like in this link but I can't find this path :

In the Program field, specify the path to the compiler archive depending on the chosen predefined template.

lessc for Less.

sass for Sass/SCSS.

If you followed the standard installation procedure with npm, JetBrains Rider locates the required files itself and fills in the field automatically. Otherwise, type the path manually or click the Browse button and choose the file location in the dialog that opens.

I don't know if this even would solve my problem or not.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
elaaa
  • 19
  • 1
  • 11
  • So .. 1) How is your File Watcher looks right now? 2) Have you installed the actual SCSS compiler? https://sass-lang.com/install. In general: you install compiler first and make sure that you can compile some very basic SCSS from the command line first (to ensure that it works). Once you get it working, then proceed with setting up File Watcher in WebStorm. File Watcher basically just calls an external app for you on file change. Nothing super fancy. https://www.jetbrains.com/help/webstorm/using-file-watchers.html – LazyOne May 16 '21 at 10:30
  • Thank you for your reply, I run SASS --version and got 1.32.12 compiled with dart2js 2.12.4, so I guess it's installed, but I still get the same error and when I clicked on edit for the SCSS watcher the program section was not linked to any file it's only written SCSS with red color – elaaa May 16 '21 at 11:29
  • So it looks like the IDE is unable to detect the path right now (you may need to restart your computer or at least IDE so it updates environment variables or whatnot). In any case: point to the actual executable file (fill path). Use `where sass` (or alike) to see where that executable is located. – LazyOne May 16 '21 at 12:42
  • Thank you I executed where sass and set the path in the program section and now it works . But I just want to know I don't know much about SCSS and SASS and I want to know if setting the path to SASS file would affect my work since I am working with SCSS – elaaa May 16 '21 at 13:11
  • Then you need to read the docs first: https://sass-lang.com/documentation/syntax . Sass vs SCSS: https://stackoverflow.com/a/5732683 – LazyOne May 16 '21 at 13:17
  • Ok thank you for all of your help – elaaa May 16 '21 at 13:34

0 Answers0