追梦猪(zmz)在进行node路由访问的时候突然报错,只提示了ReferenceError 字样跟一些报错提示,这是我们在引入一些页面或者参数引发的错误,在此记录。
我们常见的错误出在我们修改的当前页面已经入口文件app,路由文件routes,视图文件views当中,所以看其他文件只是起一个辅助作用!
ReferenceError: D:\Documents\HBuilderProject\123\app\views\index.ejs:8
6| <meta http-equiv="X-UA-Compatible" content="IE=edge">
7| <meta name="viewport" content="width=device-width, initial-scale=1">
>> 8| <title><%= names%></title>
9| <meta name="description" content="">
10| <link rel="apple-touch-icon" href="apple-touch-icon.png">
11| <link rel="shortcut icon" href="favicon.ico">
names is not defined
at eval (eval at compile (D:\Documents\HBuilderProject\123\app\node_modules\ejs\lib\ejs.js:618:12), <anonymous>:28:26)
at returnedFn (D:\Documents\HBuilderProject\123\app\node_modules\ejs\lib\ejs.js:653:17)
at tryHandleCache (D:\Documents\HBuilderProject\123\app\node_modules\ejs\lib\ejs.js:251:36)
at View.exports.renderFile [as engine] (D:\Documents\HBuilderProject\123\app\node_modules\ejs\lib\ejs.js:482:10)
at View.render (D:\Documents\HBuilderProject\123\app\node_modules\express\lib\view.js:135:8)
at tryRender (D:\Documents\HBuilderProject\123\app\node_modules\express\lib\application.js:640:10)
at Function.render (D:\Documents\HBuilderProject\123\app\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (D:\Documents\HBuilderProject\123\app\node_modules\express\lib\response.js:1008:7)
at D:\Documents\HBuilderProject\123\app\routes\index.js:7:7
at Layer.handle [as handle_request] (D:\Documents\HBuilderProject\123\app\node_modules\express\lib\router\layer.js:95:5)
本文地址:https://www.zhuimengzhu.com/details/131.html
转载地址:暂无
转载说明:转载时请在文首注明来源zhuimengzhu.com 及教程作者,并附本文链接。谢谢各位编辑同仁配合。zhuimengzhu 保留追究相应责任的权利。