alsotang / node-lessons

:closed_book:《Node.js 包教不包会》 by alsotang
16.54k stars 4.7k forks source link

lesson4中遇到的 parent找不到的问题 #143

Open Yuguantao opened 7 years ago

Yuguantao commented 7 years ago

代码和app.js一样 但是启动时 会报错

D:\练习\爬虫\node_modules\_cheerio@1.0.0-rc.2@cheerio\lib\parse.js:69
    var oldParent = node.parent || node.root,

TypeError: Cannot read property 'parent' of undefined
    at Function.exports.update (D:\练习\爬虫\node_modules\_cheerio@1.0.0-rc.2@ch
eerio\lib\parse.js:69:25)
    at module.exports (D:\练习\爬虫\node_modules\_cheerio@1.0.0-rc.2@cheerio\lib
\parse.js:19:11)
    at Function.exports.load (D:\练习\爬虫\node_modules\_cheerio@1.0.0-rc.2@chee
rio\lib\static.js:27:14)
    at D:\练习\爬虫\app1.js:31:21
    at Array.map (native)
    at D:\练习\爬虫\app1.js:28:20
    at EventProxy.all (D:\练习\爬虫\node_modules\_eventproxy@1.0.0@eventproxy\li
b\eventproxy.js:407:20)
    at EventProxy.trigger (D:\练习\爬虫\node_modules\_eventproxy@1.0.0@eventprox
y\lib\eventproxy.js:182:22)
    at D:\练习\爬虫\app1.js:48:13
    at Request.callback (D:\练习\爬虫\node_modules\_superagent@3.6.0@superagent\
lib\node\index.js:679:14)