我试图使用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"
}),
)
下面是使用它的模板片段:<link rel="stylesheet" href="{% static "/css/style.scss"|compile %}" />
错误信息不是很有用。有人知道是什么问题吗?
django-static-precompiler不能与Dart Sass一起工作。您可以使用已弃用的ruby-sass,或者使用不同的预编译器。