【发布时间】:2014-01-13 22:03:48
【问题描述】:
我使用 expressJs,今天我遇到了错误。我重新安装 node.js 和 expressJs 但我的问题没有解决。当我使用并运行自动生成的快速应用程序或运行我的其他应用程序时,我遇到了这样的错误。
本地服务器错误
500 Error: C:\express-app\test\test\views\layout.jade:1<br/> > 1| doctype 5 <br/> 2| html <br/> 3| head <br/> 4| title= title <br/><br/>`doctype 5` is deprecated, you must now use `doctype html`
screenShots CMD
【问题讨论】:
-
你能把你的layout.jade代码放上来吗?
-
@FÔx Gênki 此代码由 express
doctype 5 html head title= title link(rel='stylesheet', href='/stylesheets/style.css') body block content自动生成 -
@H.T 错误输出为您提供解决方案。使用
doctype html而不是doctype 5。您已安装的jade版本不支持后者(即deprecated)。 -
@Jonathan Lonowski 我改变了它,但我有问题。 以上代码通过 express 命令自动生成
-
@H.T 它可能是为
jade的0.x版本生成的。但是,由于您安装了1.x,因此该行不再有效。另请注意,Express won't be including the command 继续前进。