简体   繁体   中英

Unhandled promise rejection AVA

I want to use ava for test my code but when I try it I'm getting the following error... I think there is a catch (err) missing...

(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.

Any idea how to resolve this...?

Thanks in advance.

Yes, update Node . <- They recommend Node.js 12.15 in that issue thread.

For future reference, as well as StackOverflow, you want to search the GitHub issues of whatever is throwing or misbehaving, when it is something in the stack.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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