javascriptnode.jspromiseavaunhandled

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.


Solution

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