2014-01-13 108 views
0

我使用expressJs,今天我得到了错误。我重新安装node.js和expressJs,但我的问题没有解决。当我使用并运行自动生成快速应用程序或运行我的其他应用程序时,我有这样的错误。expressJS/Node应用程序运行错误

的LocalServer错误

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` 

截图CMD

enter image description here

+0

你能放你的layout.jade代码? – Fox

+0

@狐狸元气用快递 'DOCTYPE 5 HTML 头 标题=标题 链路此代码自动生成(相对= '样式',HREF = '/样式表/ style.css文件') 体 块content' –

+0

@ HT错误输出为您提供解决方案。使用'doctype html'而不是'doctype 5'。后者不被你安装的'jade'版本支持(被弃用)。 –

回答

4

该错误消息说,如何解决它:

`doctype 5` is deprecated, you must now use `doctype html` 

只要改变5html在开始_layout.jade

doctype html 
html 
    head 
    title= title 
# ... 

这是与release of [email protected]做了不少的变化之一:

  • 删除5 shorcut为html DOCTYPE(@ForbesLindesay)
+0

这是真的,@ H.T:也看看这个问题:https://github.com/visionmedia/express/pull/1875 – Fox

+0

@Jonathan Lonowski坦克很多 –

相关问题