【问题标题】:django-static-precompiler throwing error with no messagedjango-static-precompiler 抛出错误,没有消息
【发布时间】:2021-05-11 01:04:22
【问题描述】:

我正在尝试使用 django-static-precompiler 编译 scss,但我收到一个错误 StaticCompilationError 说 No exception message supplied django-static-precompiler 的版本是 2.0 并且 sass 已安装并且是最新版本( 1.32.6)。我将预编译器配置为指向我的 settings.py 中的节点模块。

STATIC_PRECOMPILER_COMPILERS = (
    ('static_precompiler.compilers.SCSS', {
        "executable": "node_modules/.bin/sass"
    }),
)

这是一个来自模板的 sn-p:<link rel="stylesheet" href="{% static "/css/style.scss"|compile %}" />

错误信息不是很有帮助。有谁知道问题可能是什么?

【问题讨论】:

    标签: django sass django-static-precompiler


    【解决方案1】:

    django-static-precompiler 不适用于 Dart Sass。您可以使用已弃用的 ruby​​-sass,也可以使用其他预编译器。

    【讨论】:

      猜你喜欢
      • 2019-02-18
      • 1970-01-01
      • 1970-01-01
      • 2013-08-25
      • 1970-01-01
      • 2020-09-01
      • 2017-11-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多