Javascript 500 SyntaxError:使用简单jade文件时出现意外标记(41:5)
我正在学习使用jade的Express和模板。我已经编写了非常简单的代码,但我发现了以下错误。请告诉我有什么问题 错误: 500语法错误:意外标记41:5 layout.jade:Javascript 500 SyntaxError:使用简单jade文件时出现意外标记(41:5),javascript,node.js,express,pug,Javascript,Node.js,Express,Pug,我正在学习使用jade的Express和模板。我已经编写了非常简单的代码,但我发现了以下错误。请告诉我有什么问题 错误: 500语法错误:意外标记41:5 layout.jade: doctype html html head title= title link(rel="stylesheet", href="bootstrap.min.css") body div.container block conte
doctype html
html
head
title= title
link(rel="stylesheet", href="bootstrap.min.css")
body
div.container
block content
list.jade:
我尝试使用以下代码块,但在这两种情况下都出现了此错误:
审判:
审判:
getInformation是我在另一个模块飞行中编写的方法。正在从调用list.jade的js文件传递航班参数
任何人都可以帮我。似乎有一些语法错误,但我不明白?谢谢。在一个选项卡中移动身体
doctype html
html
head
title= title
link(rel="stylesheet", href="bootstrap.min.css")
body
div.container
block content
在一个选项卡中移动身体
doctype html
html
head
title= title
link(rel="stylesheet", href="bootstrap.min.css")
body
div.container
block content
有点晚了,但我只是通过深入研究node_模块找到了解决方案。对于您,我将从文件@NodeJS Lynda\Chap-5\06\start\node\u modules\jade\node\u modules\with\node\u modules\acorn\dist\acorn.js开始 转到第1002行并注销该行的变量,如果它们没有任何意义,继续向下移动到堆栈跟踪中的下一行
Parser.pp$1.parseTopLevel line 655
重复每个日志,直到它为您提供更清晰的工作内容。帕格模板将解析所有可能的内容,直到它“中断”,这将为您提供一个非常准确的位置来查看您的确切问题。IE刚刚超过最后一个日志有点晚了,但我只是通过深入研究node_模块找到了解决方案。对于您,我将从文件@NodeJS Lynda\Chap-5\06\start\node\u modules\jade\node\u modules\with\node\u modules\acorn\dist\acorn.js开始 转到第1002行并注销该行的变量,如果它们没有任何意义,继续向下移动到堆栈跟踪中的下一行
Parser.pp$1.parseTopLevel line 655
重复每个日志,直到它为您提供更清晰的工作内容。帕格模板将解析所有可能的内容,直到它“中断”,这将为您提供一个非常准确的位置来查看您的确切问题。IE刚刚超过最后一个日志感谢您的回复。我正在使用sublime editor。尝试了您的解决方案,但仍然得到相同的错误。感谢您的回复。我正在使用sublime editor。尝试了您的解决方案,但仍然得到相同的错误。
Parser.pp$1.parseExpressionStatement
Parser.pp$1.parseTopLevel line 655