Skip to content

React 0.56 support #1283

@xzilja

Description

@xzilja

Issue

Updating to react native v0.56.0 requires flow bin update to ^0.75.0 which results in following errors

Error ┈┈┈┈┈ node_modules/react-native-firebase/dist/modules/firestore/Query.js.flow:417:20

Property fieldpath is missing in NativeFieldPath [1].

 [1]  46│   fieldPath: NativeFieldPath,
        :
     414│           fieldOrder.fieldPath.string
     415│         ) {
     416│           values.push(docSnapshot.get(fieldOrder.fieldPath.string));
     417│         } else if (fieldOrder.fieldPath.fieldpath) {
     418│           const fieldPath = new FieldPath(...fieldOrder.fieldPath.fieldpath);
     419│           values.push(docSnapshot.get(fieldPath));
     420│         }


Error ┈┈┈┈ node_modules/react-native-firebase/dist/modules/storage/reference.js.flow:77:12

Cannot return new StorageTask(...) because StorageTask [1] is incompatible with
Promise [2].

     74│    * @return {Promise}
     75│    */
 [2] 76│   downloadFile(filePath: string): Promise<Object> {
 [1] 77│     return new StorageTask(
     78│       DOWNLOAD_TASK,
     79│       getNativeModule(this._storage).downloadFile(this.path, filePath),
     80│       this
     81│     );
     82│   }
     83│
     84│   /**


Error ┈┈┈ node_modules/react-native-firebase/dist/modules/storage/reference.js.flow:100:12

Cannot return new StorageTask(...) because StorageTask [1] is incompatible with
Promise [2].

      97│    */
 [2]  98│   putFile(filePath: Object, metadata: Object = {}): Promise<Object> {
      99│     const _filePath = filePath.replace('file://', '');
 [1] 100│     return new StorageTask(
     101│       UPLOAD_TASK,
     102│       getNativeModule(this._storage).putFile(this.path, _filePath, metadata),
     103│       this
     104│     );
     105│   }
     106│ }
     107│

Environment

  1. Application Target Platform: iOS
  1. Development Operating System: macOS High Sierra
  1. Build Tools: Not needed
  1. React Native version: 0.56.0
  1. React Native Firebase Version: 4.2.0
  1. Firebase Module: firestore, storage
  1. Are you using typescript? no

Loving react-native-firebase? Please consider supporting them with any of the below:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions