Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

找不到原因 Error: Can't set headers after they are sent.

$
0
0

后台一直报这个错:

Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:346:11)
    at ServerResponse.header (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\Cityb
aoCMS\node_modules\express\lib\response.js:700:10)
    at ServerResponse.res.contentType.res.type (D:\WORKING\WORKSPACE\MAVEN_PROJE
CTS\platform\CitybaoCMS\node_modules\express\lib\response.js:537:15)
    at ServerResponse.send (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\Citybao
CMS\node_modules\express\lib\response.js:129:14)
    at ServerResponse.res.send (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\Cit
ybaoCMS\node_modules\express-promise\lib\express_promise.js:200:13)
    at fn (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\CitybaoCMS\node_modules\
express\lib\response.js:934:10)
    at View.exports.renderFile [as engine] (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\
platform\CitybaoCMS\node_modules\ejs\lib\ejs.js:355:10)
    at View.render (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\CitybaoCMS\node
_modules\express\lib\view.js:93:8)
    at EventEmitter.app.render (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\Cit
ybaoCMS\node_modules\express\lib\application.js:566:10)
    at ServerResponse.res.render (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\C
itybaoCMS\node_modules\express\lib\response.js:938:7)
    at D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\CitybaoCMS\node_modules\expr
ess-partials\index.js:75:13
    at View.exports.renderFile [as engine] (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\
platform\CitybaoCMS\node_modules\ejs\lib\ejs.js:355:10)
    at View.render (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\CitybaoCMS\node
_modules\express\lib\view.js:93:8)
    at EventEmitter.app.render (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\Cit
ybaoCMS\node_modules\express\lib\application.js:566:10)
    at ServerResponse.res.render (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\C
itybaoCMS\node_modules\express\lib\response.js:938:7)
    at ServerResponse.res.render (D:\WORKING\WORKSPACE\MAVEN_PROJECTS\platform\C
itybaoCMS\node_modules\express-partials\index.js:58:9)

定位不到问题出在哪里,之前还没有问题的,什么都不处理只要请求后台就会报错。 nodejs调试起来还真实麻烦,各位大神有没有好的办法定位问题


Viewing all articles
Browse latest Browse all 14821

Trending Articles