Nodejs报内部错误 TypeError: Cannot read property 'destroy' of undefined的解决方法
【现象】
内部错误 TypeError: Cannot read property 'destroy' of undefined
at AutoSceneService.getGroup (D:\work\intellij\exampledemo\app\service\autoScene.js:26:40)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async GroupController.groupList (D:\work\intellij\exampledemo\app\controller\group.js:17:17)
at async D:\work\intellij\exampledemo\app\middleware\jwtsk.js:20:16
at async D:\work\intellij\exampledemo\node_modules\egg-development\app\middleware\egg_loader_trace.js:9:50
at async xframe (D:\work\intellij\exampledemo\node_modules\egg-security\lib\middlewares\xframe.js:7:5)
at async xssProtection (D:\work\intellij\exampledemo\node_modules\egg-security\lib\middlewares\xssProtection.js:7:5)
at async nosniff (D:\work\intellij\exampledemo\node_modules\egg-security\lib\middlewares\nosniff.js:8:5)
at async noopen (D:\work\intellij\exampledemo\node_modules\egg-security\lib\middlewares\noopen.js:8:5)
【解决方法】
新增
const _ = require('lodash')
例如
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://onefire.blog.csdn.net/article/details/125203000
内容来源于网络,如有侵权,请联系作者删除!