我正在运行一个 Express 应用程序,但遇到了 JS_Parse_Error。我不知道为什么。我基本上已经注释掉了我编写的所有新代码,但我仍然收到错误消息。有没有办法找出哪个 Javascript 行给了我错误?
Error
at new JS_Parse_Error (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:196:18)
at js_error (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:204:11)
at croak (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:636:9)
at token_error (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:644:9)
at expect_token (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:657:9)
at expect (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:660:36)
at expr_atom (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1112:17)
at maybe_unary (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1287:19)
at expr_ops (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1322:24)
at maybe_conditional (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:1327:20)
最佳答案
这可能与您不再相关,但我收到了同样的错误消息 - 我不得不说这不是那么冗长 - 我的问题是缺少逗号。
注意 ng-show 之前缺少逗号...
.container(itemscope, itemtype='http://schema.org/Person' ng-show='user')
.row
关于javascript - 如何找到 JS_Parse_Error 的来源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17951602/