Ionic Cordova FCM Error node:844

I get the below error when I try to run or to build android, after installing cordova-plugin-fcm Plugin.

(node:844) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Invalid data, chunk must be a string or buffer, not object (node:844) [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 exxit code.

have anyone any idea?

1 answer

  • answered 2018-02-20 22:20 Emilio López Arias

    Remove the android platform:

    ionic cordova platform remove android

    Then reinstall:

    ionic cordova platform add android@6.4.0

    Now you should be able to install cordova-plugin-fcm without errors:

    ionic cordova plugin add cordova-plugin-fcm