Reputation: 517
I installed Sass via Chocolatey and get this error in the Netbeans console:
"C:\ProgramData\chocolatey\lib\sass\tools\sass.bat" "--cache-location" "C:\Users\oxk4r\AppData\Local\NetBeans\Cache\8.2\sass-compiler" "--debug-info" "--style" "compact" "C:\xampp\htdocs\SASS_01\scss\style.scss" "C:\xampp\htdocs\SASS_01\css\style.css" Could not find an option named "cache-location".
No *.css file is generated at all.
Upvotes: 3
Views: 5168
Reputation: 2369
I copy here the answer of Pete Whelpton at Apache Netbeans bug tracking for future reference because it is very useful for this issue:
https://issues.apache.org/jira/browse/NETBEANS-2347
Netbeans SASS support was written for the original Ruby SASS. Modern SASS implementations (Dart SASS et al) are based on libsass.
There is very limited/incomplete support for libsass already in Netbeans (command line flags are NOT supported - but it should compile). To implement the workaround:
- Open your netbeans.conf file (/etc/netbeans.conf in the NB installation folder)
- Add the following to the netbeans_default_options parameter: -J-Dnb.sass.libsass=true
- Launch Netbeans, Tools -> Options -> HTML5/JS -> CSS PreProcessors and configure it to point to your libsass implementation (e.g. the sass.bat file in your dart-sass installation folder)
In my case (Apache Netbeans Windows 64) this workaround worked.
Upvotes: 4
Reputation: 111
for Windows you may to edit sass.bat file.
In file need in variable arguments
to replace a substring "--debug-info"
and (for example) "--cache-location C:\Users\xyz\AppData\Local\NetBeans\Cache\10.0\sass-compiler"
on empty data
for example:
SET repaire_arguments=%arguments:--debug-info=%
SET repaire_arguments=%repaire_arguments:--cache-location C:\Users\xyz\AppData\Local\NetBeans\Cache\10.0\sass-compiler=%
"%SCRIPTPATH%\src\dart.exe" "-Dversion=1.16.1" "%SCRIPTPATH%\src\sass.dart.snapshot" %repaire_arguments%
Upvotes: 1
Reputation: 186
In your Sass install directory, in file sass.bat, after the command:
set arguments=%*
add the following (replace username with your windows username)...
set arguments=%arguments:--cache-location =%
set arguments=%arguments:C:\Users\username\AppData\Local\NetBeans\Cache\8.2\sass-compiler =%
set arguments=%arguments:--debug-info =%
This strips out all of the arguments that are no longer accepted.
Upvotes: 10
Reputation: 1
When I had that error my installation wasn't working correctly. I didn't use Chocolatey though. I installed ruby and sass with gem, added the path in the config and got it working. Maybe that helps.
Upvotes: 0