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

Posted caimuguodexiaohongmao

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了报错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(‘一些内容‘)

 

以上是关于报错The "chunk" argument must be one of type string or Buffer. Received type object的主要内容,如果未能解决你的问题,请参考以下文章

easygui.msgbox("Hello there!")报错:Tcl_Init error: Can't find a usable init.tcl in the f

nginx报错the "ssl" directive is deprecated, use the "listen ... ssl" directive in(

pytest_terminal_summary重写收集测试报告并发送邮件,报错"Argument(s) {'Config'} are declared in the hook

freemind 运行就报错~"The registry refers to a nonexistent Java Runtime Environment installation or t

报错"Could not get a resource from the pool; nested exception is io.lettuce.core

gateway 报错 allowedOrigins cannot contain the special value "*"