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

为什么现在连页面都获取不到了,直接就是404,404页面反而能正确渲染?急!!!

页面访问:

http://img1.sycdn.imooc.com//59379d840001530506410056.jpg

http://img1.sycdn.imooc.com//59379b760001a76504440428.jpg

路由:

http://img1.sycdn.imooc.com//59379bc900016f5f05180076.jpg

控制层:

http://img1.sycdn.imooc.com//59379be30001498a04340379.jpg

app.js

http://img1.sycdn.imooc.com//59379c510001483105560438.jpg


目录(所有的页面都 get 不到):

http://img1.sycdn.imooc.com//59379ddc0001d38d02290630.jpg

正在回答

1 回答

错误原因好像是这个:(                    

还是不知道怎么解决~

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



0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
node建站攻略(二期)——网站升级
  • 参与学习       51940    人
  • 解答问题       408    个

帮助你深入前后端开发留下的迷惑,为进一步自学打下基础

进入课程

为什么现在连页面都获取不到了,直接就是404,404页面反而能正确渲染?急!!!

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信