Reputation: 539
I'm getting an error every time IntelliJ's SCSS File Watcher tries to transpile my .scss
files into .css
files. I know I've provided correct arguments, as I've use the exact same arguments on a different platform, and they've worked correctly there. Every time I make a change in a watched .scss
file I get the following error in the Event Log:
An exception occurred while executing watcher 'SCSS'. Watcher has been disabled. Fix it.: Cannot run program "sass" (in directory "C:\Users\trevo\dev\projects\web\CaffeineSocket\styles\sass"): CreateProcess error=2, The system cannot find the file specified
I've also tried giving it the path to Sass, and then the error changes to:
An exception occurred while executing watcher 'SCSS'. Watcher has been disabled. Fix it.: Cannot run program "C:\Ruby24-x64\bin\sass" (in directory "C:\Users\trevo\dev\projects\web\CaffeineSocket\styles\sass"): CreateProcess error=193, %1 is not a valid Win32 application
How do I fix this and get my Sass/SCSS files to transpile?
Upvotes: 1
Views: 8012
Reputation: 539
I ended up needing to provide the path to the .bat
file for Sass, and I did not realize (coming from Linux to Windows) that the sass
file was not the executable, and that I rather needed to provide the sass.bat
file.
For me, the full path to that file was C:\Ruby24-x64\bin\sass.bat
.
To change this, you can either click on the Fix it
linked text in IntelliJ's Event Log when you receive the error when the File Watcher fails, or you can get to the File Watcher by going through:
File --> Settings --> Tools --> File Watchers --> SCSS --> Edit (Enter) --> Watcher Settings --> Program:
Upvotes: 1