Usually with Emacs errors are syntax related. This one seems anyway a bit obscure.
On windows 10 installed sass-dart with chocolaty.
choco install sass
Note: at much earlier time installed sass-node globally, and then at the same much earlier time installed sass-node into directory with
npm install sass-node -D, then removed the sass-node global installation. At time of error, there's no sass on windows path variable. This should be irrelevant.
Added scss-mode from melpa and configure as such:
(use-package scss-mode :commands (scss-mode scss-compile) :mode ("\\.scss" . scss-mode) :config (require 'scss-mode) ;;(setq scss-sass-command "C:/ProgramData/chocolatey/lib/sass/tools/sass.bat") ;;(setq exec-path (cons (expand-file-name "C:/ProgramData/chocolatey/bin/sass.exe") exec-path)) (setq scss-compile-at-save 'nil) ;;(autoload 'scss-mode "scss-mode") );end scss-mode
I get the same error using the
setq scss-sass-command, the
setq exec-path, switching the program paths in the same two lines (
sass.exe), using both of them or neither of them.
"sass 'c:/Users/Username/Desktop/wd/sass-test.scss' 'c:/Users/Username/Desktop/wd/sass-test.css' Duplicate source "'c"."
Duplicate source error. What is this error? What is the
c in it? How to fix it?
I suspect Emacs runs somewhere into the option of using one or another sass executable, though I shouldn't know where it's getting the second one (the one not specified in the init file). Is it somehow accessing node-sass from a local npm package directory? That seems unlikely.
In any case, when I run sass directly from the command line, or from an Emacs wrapper on the command line, it works no problem. It just won't compile from scss-mode.
Also, and possibly relevant? Chocolatey won't upgrade dart-sass. It gives this error:
" - dart-sdk (exited 1) - dart-sdk not upgraded. An error occurred during installation: Updating 'dart-sdk 2.7.0' to 'dart-sdk 2.8.1' failed. Unable to find a version of 'sass' that is compatible with 'dart-sdk 2.8.1'."
Should I dump dart-sass like yesterday's news and go back to libSass via node?