报错内容:

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

解决:

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

 

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

 

相关文章:

  • 2021-06-10
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
猜你喜欢
  • 2022-12-23
  • 2021-07-05
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
相关资源
相似解决方案