gpt4 book ai didi

node.js - expressJS/Node应用程序运行错误

转载 作者:太空宇宙 更新时间:2023-11-04 03:10:40 25 4
gpt4 key购买 nike

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

本地服务器错误

 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

最佳答案

错误消息说明了如何解决它:

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

只需将_layout.jade开头的5更改为html即可:

doctype html
html
head
title= title
# ...

这是 release of jade@1.0.0 所做的众多更改之一:

  • Remove 5 shorcut for html doctype (@ForbesLindesay)

关于node.js - expressJS/Node应用程序运行错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21102285/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com