我使用 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 的错误好消息,但是没有告诉我任何关于语法错误的模板引擎总比没用好。任何人都可以阐明发生了什么吗?