为了定位错误,我将项目删减到最简,现在只留下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文件,让我很想不明白,这是为什么?
qq_神话_6
相关分类