当我重新启动GULP时, Nunjucks会引发此错误。我看不出问题可能是什么。不幸的是,Nunjucks 没有给我发生这种情况的文件或标签。
events.js:141
throw er; // Unhandled 'error' event
^
Template render error: (unknown path)
Template render error: expected block end in endblock statement
at Object.exports.withPrettyErrors (D:\dev\ngs-frontend-next\node_modules\gulp-nunjucks-render\node_modules\nunjucks\src\lib.js:35:17)
at Obj.extend.render (D:\dev\ngs-frontend-next\node_modules\gulp-nunjucks-render\node_modules\nunjucks\src\environment.js:374:20)
at Obj.extend.renderString (D:\dev\ngs-frontend-next\node_modules\gulp-nunjucks-render\node_modules\nunjucks\src\environment.js:261:21)
at Object.module.exports.renderString (D:\dev\ngs-frontend-next\node_modules\gulp-nunjucks-render\node_modules\nunjucks\index.js:66:14)
at Transform._transform (D:\dev\ngs-frontend-next\node_modules\gulp-nunjucks-render\index.js:46:21)
似乎我在我的基本index.html文件中正确定义了 block 和 enblock 。我有这两个标签:
{% block content %}
......
{% endblock include "components/cmpBreadcrumb/cmpBreadcrumb.html" %}
有任何想法吗?