Cordova plugin File, FileTransfer with Nodejs compatibility issue

Hi.

I just updated to node v9.6.1 and I notice that cordova support for file and file transfer suddenly stops working. In particular my code use to check the platform where my app run and initialized the storage directory for the device.

e.g.)

import { FileTransfer, FileTransferObject } from ‘@ionic- native/file-transfer’;
import { File } from ‘@ionic-native/file’;

declare var cordova: any;

constructor(…) {
this.platform.ready().then(() => {
//make sure this runs on an actual device and not on an emulation (e.g. chrome tools device mode)
if (!this.platform.is(‘cordova’)) {
return false;
}

              if (this.platform.is('ios')) {
                this.storageDirectory = cordova.file.documentsDirectory;
              }
              else if (this.platform.is('android')) {
                this.storageDirectory = cordova.file.externalRootDirectory;
              } else {
                // exit otherwise, but we could add additional types here (e.g. "Windows")
                return false;
              }

            });

}

the above code was successfully able to initialized storageDirectory correctly but eversince i updated to node 9.6.1 it starts to break. Does anyone know how to get around with this issue?

Thanks in advance.
AJ