新萌遇到node报错,请前辈指点

代码如下

// 引入依赖
const express = require('express')
const superagent = require('superagent')
const cheerio = require('cheerio')

// 建立 express 实例
const app = express()

app.get('/', (req, res) => {
  superagent.get('https://cnodejs.org/')
    .end((err, sres) => {
      if (err) { return next(err) }
      let $ = cheerio.load(sres.text);
      let items = $('#topic_list .topic_title').map((item) => {
        let $item = $(item)
        return {
          title: $item.attr('title'),
          href: $item.attr('href')
        }
      })
      res.send(items)
    })
})

app.listen(3000, () => { console.log('app is listening at port 3000') })

报错如下:

TypeError: Converting circular structure to JSON
    at Object.stringify (native)
    at stringify 
    at ServerResponse.json
    at ServerResponse.send
    at superagent.get.end
    at Request.callback 
    at Stream.<anonymous>
    at emitNone (events.js:86:13)
    at Stream.emit (events.js:185:7)
    at Unzip.<anonymous>

没找到原因。

查看回复