渲染中的节点js错误(模板显示)

时间:2014-11-27 10:42:05

标签: node.js express

当我尝试创建模板和节点执行时会出现此错误,请帮助我

Error: Failed to lookup view "default" in views directory "C:\Users\Act027\Desktop\node\views"
   at EventEmitter.app.render (C:\Users\Act027\Desktop\node\node_modules\express\lib\application.js:519:17)
   at ServerResponse.res.render (C:\Users\Act027\Desktop\node\node_modules\express\lib\response.js:904:7)
   at C:\Users\Act027\Desktop\node\app.js:7:6
   at Layer.handle [as handle_request] (C:\Users\Act027\Desktop\node\node_modules\express\lib\router\layer.js:82:5)
   at next (C:\Users\Act027\Desktop\node\node_modules\express\lib\router\route.js:100:13)
   at Route.dispatch (C:\Users\Act027\Desktop\node\node_modules\express\lib\router\route.js:81:3)
   at Layer.handle [as handle_request] (C:\Users\Act027\Desktop\node\node_modules\express\lib\router\layer.js:82:5)
   at C:\Users\Act027\Desktop\node\node_modules\express\lib\router\index.js:235:24
   at Function.proto.process_params (C:\Users\Act027\Desktop\node\node_modules\express\lib\router\index.js:313:12)
   at C:\Users\Act027\Desktop\node\node_modules\express\lib\router\index.js:229:12 

1 个答案:

答案 0 :(得分:0)

您位于错误的文件夹中,或者您没有名为“默认”的视图。