nodeJs 调试异步程序追踪异步报错

 DeprecationWarning: Calling an asynchronous function without callback is deprecated.

翻译: 不建议在不回调的情况下调用异步函数。

命令: node index.js 返回的信息有限.

(node:9276) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
    at makeCallback (fs.js:127:12)
    at Object.fs.unlink (fs.js:1049:14)
    at D:\learning\myblog_v3\routes\signup.js:82:9
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

添加参数执行的参数, 使报错更加友好

node --trace-deprecation index.js

or:

node --throw-deprecation index.js

 

posted @ 2018-09-27 17:01  仲柯  阅读(556)  评论(0编辑  收藏  举报