Nodejs报内部错误 TypeError: Cannot read property ‘destroy‘ of undefined的解决方法

x33g5p2x  于2022-06-10 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(318)

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')    

例如

相关文章

微信公众号

最新文章

更多