DeprecationWarning:已弃用未处理的承诺拒绝。 Android中的ioni 2添加平台

时间:2018-07-03 09:56:39

标签: angular ionic-framework ionic2

在ionic 2中添加平台时出现以下错误

(node:5360) 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:5360) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
    cated. In the future, promise rejections that are not handled will terminate the
     Node.js process with a non-zero exit code.

1 个答案:

答案 0 :(得分:0)

那可能是因为存在过时的节点模块。 您可以尝试运行

ionic doctor check 

在项目的根文件夹中,这可以解决所有问题。

文档: https://ionicframework.com/docs/cli/doctor/check/