【发布时间】:2020-06-09 02:49:58
【问题描述】:
谁能告诉我这个错误是关于什么的?
(node:6540) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined
at global.loadFactions (C:\Users\Brosiden\Desktop\redunion\Server\packages\server\src\systems\factions\index.js:11:29)
at prom.then (C:\Users\Brosiden\Desktop\redunion\Server\packages\server\src\systems\databox\index.js:29:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:6540) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6540) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
昨晚一切正常。早上我重新启动了我的电脑,然后它一直抛出这个错误。
【问题讨论】:
-
factions\index.js第 11 行发生了什么?显示除错误之外的代码。 -
let factions = databox[4].data.factions;这是第 11 行