使用Assetic和Symfony 3的CSS少了资产.ERROR:模板" :: base.html.twig"包含一个错误:没有"更少"过滤

时间:2017-05-18 11:08:54

标签: symfony less assetic

我正在尝试在symfony3中使用LESS。 我已经安装了AsseticBundle。

我正在阅读本教程。

http://kiwwito.com/less-css-with-assetic-and-symfony-2/

但我的config.yml看起来有点不同。

assetic:
    filters:
        less:
            node: /usr/bin/node
            node_paths: [/usr/local/lib/node_modules]

我的文件系统中没有.node_libraries。

我的base.html.twig

{% stylesheets filter='less' output='css/compiled-main.css' '@MyBundle/Resources/public/less/*'%}
    <link href="" type="text/css" rel="stylesheet" media="all" />
{% endstylesheets %}

重新加载页面后,我收到了错误。

An exception has been thrown during the compilation of a template ("There is no "less" filter.") in "base.html.twig".

我有Symfony 3.2.8。

0 个答案:

没有答案
相关问题