繁体   English   中英

未处理的承诺拒绝 AVA

[英]Unhandled promise rejection AVA

我想使用 ava 来测试我的代码,但是当我尝试它时,我收到以下错误......我认为缺少一个捕获(错误)......

(node:7640) UnhandledPromiseRejectionWarning: C:\...\TesBoard-db\node_modules\ava\lib\node-arguments.js:9
                } catch {
                        ^

(node:7640) 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:7640) [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.

知道如何解决这个问题......?

提前致谢。

是的,更新 Node <- 他们在该问题线程中推荐 Node.js 12.15。

为了将来参考,以及 StackOverflow,你想搜索 GitHub 上的任何抛出或行为异常的问题,当它在堆栈中时。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM