为了账号安全,请及时绑定邮箱和手机立即绑定

Error: failed to locate view "layout"

Error: failed to locate view "layout"

勇恒的思念 2015-12-21 13:08:36
为了定位错误,我将项目删减到最简,现在只留下index,在浏览器中报错为Error: failed to locate view "layout"     at Function.exports.compile (/home/pc/project/mongooseLearning/node_modules/express/lib/view.js:61:15)     at ServerResponse.res._render (/home/pc/project/mongooseLearning/node_modules/express/lib/view.js:417:18)     at ServerResponse.res.render (/home/pc/project/mongooseLearning/node_modules/express/lib/view.js:318:17)     at ServerResponse.res._render (/home/pc/project/mongooseLearning/node_modules/express/lib/view.js:432:10)     at ServerResponse.res.render (/home/pc/project/mongooseLearning/node_modules/express/lib/view.js:318:17)     at /home/pc/project/mongooseLearning/app.js:47:7     at callbacks (/home/pc/project/mongooseLearning/node_modules/express/lib/router/index.js:272:11)     at param (/home/pc/project/mongooseLearning/node_modules/express/lib/router/index.js:246:11)     at pass (/home/pc/project/mongooseLearning/node_modules/express/lib/router/index.js:253:5)     at Router._dispatch (/home/pc/project/mongooseLearning/node_modules/express/lib/router/index.js:280:5)     这是我项目的截图。我从始至终的文件里都没有写layout,但是它却要去找layout文件,让我很想不明白,这是为什么?
查看完整描述

1 回答

?
qq_神话_6

TA贡献6条经验 获得超0个赞

你写html页面元素是完整的吗?会不会你没有写头元素之类的?

查看完整回答
反对 回复 2015-12-22
  • 1 回答
  • 0 关注
  • 1476 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信