何我可以让我的nodejs /快递/玉堆报告明智的语法错误?

我使用Express / node.js作为模板引擎运行Jade,每当我在.jade文件中出现语法错误时,我都会得到如下的报告:

at new JS_Parse_Error (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:196:18) at js_error (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:204:11) at croak (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:636:9) at token_error (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:644:9) at expect_token (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:657:9) at expect (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:660:36) at expr_atom (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1112:17) at maybe_unary (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1287:19) at expr_ops (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1322:24) at maybe_conditional (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1327:20) 

这并没有告诉我什么地方出了什么问题。 我没有听说过关于Jade的好东西,但是一个没有告诉我语法错误的模板引擎比没有用的好。 任何人都可以阐明发生了什么?

我可以build议你为你的工作stream程使用Grunt。 Grunt JADE的输出是这样的:

 Running "jade:compile" (jade) task TypeError: src/jade/index.jade:20 18| div.page-header 19| > 20| h3(.text-muted Header Here 21| 22| div.row 23| div.col-xs-12 

要使用Grunt,您可以检查:www.gruntjs.org

要使用Grunt的Jade,请查看: https : //npmjs.org/package/grunt-contrib-jade