为什么现在连页面都获取不到了,直接就是404,404页面反而能正确渲染?急!!!
页面访问:
路由:
控制层:
app.js
目录(所有的页面都 get 不到):
页面访问:
路由:
控制层:
app.js
目录(所有的页面都 get 不到):
2017-06-07
错误原因好像是这个:(
还是不知道怎么解决~
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:357:11)
at ServerResponse.header (D:\Hexin\FrontEnd\movie\node_modules\express\lib\response.js:730:10)
at ServerResponse.send (D:\Hexin\FrontEnd\movie\node_modules\express\lib\response.js:170:12)
at done (D:\Hexin\FrontEnd\movie\node_modules\express\lib\response.js:967:10)
at Object.exports.renderFile (D:\Hexin\FrontEnd\movie\node_modules\pug\lib\index.js:422:12)
at View.exports.__express [as engine] (D:\Hexin\FrontEnd\movie\node_modules\pug\lib\index.js:465:11)
at View.render (D:\Hexin\FrontEnd\movie\node_modules\express\lib\view.js:128:8)
at tryRender (D:\Hexin\FrontEnd\movie\node_modules\express\lib\application.js:640:10)
at EventEmitter.render (D:\Hexin\FrontEnd\movie\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (D:\Hexin\FrontEnd\movie\node_modules\express\lib\response.js:971:7)
at D:\Hexin\FrontEnd\movie\app.js:90:9
at Layer.handle [as handle_request] (D:\Hexin\FrontEnd\movie\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Hexin\FrontEnd\movie\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\Hexin\FrontEnd\movie\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Hexin\FrontEnd\movie\node_modules\express\lib\router\layer.js:95:5)
at D:\Hexin\FrontEnd\movie\node_modules\express\lib\router\index.js:281:22
GET / 404 76.603 ms - 645
举报