Sass output error in Netbeans 8.2

前端 未结 4 1758
栀梦
栀梦 2020-12-07 03:31

I installed Sass via Chocolatey and get this error in the Netbeans console:

\"C:\\ProgramData\\chocolatey\\lib\\sass\\tools\\sass.bat\" \"--cache-location\" \"C:\\U

相关标签:
4条回答
  • 2020-12-07 03:50

    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.

    0 讨论(0)
  • 2020-12-07 03:51

    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:

    1. Open your netbeans.conf file (/etc/netbeans.conf in the NB installation folder)
    2. Add the following to the netbeans_default_options parameter: -J-Dnb.sass.libsass=true
    3. 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.

    0 讨论(0)
  • 2020-12-07 03:57

    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.

    0 讨论(0)
  • 2020-12-07 04:08

    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%

    0 讨论(0)
提交回复
热议问题