报错The "chunk" argument must be one of type string or Buffer. Received type object


报错内容:

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object
at ServerResponse.end (_http_outgoing.js:690:13)

原因:

response.end()方法接收的参数类型只能是字符串或Buffer,

传入的是object

解决:

 

 找到代码出错行,重写end方法,如:response.end('一些内容')

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM