每当我本地打开safiri的时候,本地的koa项目就会崩溃,不知道是啥情况。。Listeningon:8000/Users/lmn/project/u-pain-i-guess/node_modules/koa/lib/application.js:133constonerror=err=>ctx.onerror(err);^TypeError:ctx.onerrorisnotafunctionatArray.onerror(/Users/lmn/project/u-pain-i-guess/node_modules/koa/lib/application.js:133:34)atlistener(/Users/lmn/project/u-pain-i-guess/node_modules/on-finished/index.js:169:15)atonFinish(/Users/lmn/project/u-pain-i-guess/node_modules/on-finished/index.js:100:5)atcallback(/Users/lmn/project/u-pain-i-guess/node_modules/ee-first/index.js:55:10)atServerResponse.onevent(/Users/lmn/project/u-pain-i-guess/node_modules/ee-first/index.js:93:5)atemitNone(events.js:91:20)atServerResponse.emit(events.js:188:7)atonFinish(_http_outgoing.js:592:10)at_combinedTickCallback(internal/process/next_tick.js:73:7)atprocess._tickCallback(internal/process/next_tick.js:104:9)上面这串是报错信息,serverlisten在8000端口我尝试在代码里进行添加app.use(bodyParser).use(router.routes()).use(router.allowedMethods()).on('error',console.error)app.onerror=console.error仍然这样。。求大大解答。
慕标5832272
Smart猫小萌
相关分类