Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluebird def and React-Native dont work together in the same project #662

Closed
JasonMore opened this issue Feb 15, 2017 · 1 comment
Closed
Labels
bug libdef Related to a library definition

Comments

@JasonMore
Copy link

I made an example app https://github.com/JasonMore/example_bluebird_react_native_promise_issue/tree/master with the latest version of flow, flow-typed, bluebird and react-native. When I run flow I get this error

➜  example_bluebird_react_native_promise_issue git:(master) ✗ flow
[No file]:0
inconsistent use of library definitions
120:   static cast<T>(value: $Promisable<T>): Bluebird$Promise<T>;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ undefined. This type is incompatible with. See lib: flow-typed/npm/bluebird_v3.x.x.js:120
120:   static cast<T>(value: $Promisable<T>): Bluebird$Promise<T>;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ some incompatible instantiation of `T`. See lib: flow-typed/npm/bluebird_v3.x.x.js:120

[No file]:0
inconsistent use of library definitions
132:   then<U>(onFulfill?: (value: R) => $Promisable<U>, onReject?: (error: any) => $Promisable<U>): Bluebird$Promise<U>;
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. This type is incompatible with an argument type of. See lib: flow-typed/npm/bluebird_v3.x.x.js:132
 24:     onFulfill?: ?(value: R) => Promise<U> | ?U,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ null. See lib: node_modules/react-native/flow/Promise.js:24

[No file]:0
inconsistent use of library definitions
132:   then<U>(onFulfill?: (value: R) => $Promisable<U>, onReject?: (error: any) => $Promisable<U>): Bluebird$Promise<U>;
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. This type is incompatible with an argument type of. See lib: flow-typed/npm/bluebird_v3.x.x.js:132
 25:     onReject?: ?(error: any) => Promise<U> | ?U
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ null. See lib: node_modules/react-native/flow/Promise.js:25

[No file]:0
inconsistent use of library definitions
136:   done<U>(onFulfill?: (value: R) => mixed, onReject?: (error: any) => mixed): void;
                           ^^^^^^^^^^^^^^^^^^^ function type. This type is incompatible with an argument type of. See lib: flow-typed/npm/bluebird_v3.x.x.js:136
 40:     onFulfill?: ?(value: R) => mixed,
                     ^^^^^^^^^^^^^^^^^^^^ null. See lib: node_modules/react-native/flow/Promise.js:40

[No file]:0
inconsistent use of library definitions
136:   done<U>(onFulfill?: (value: R) => mixed, onReject?: (error: any) => mixed): void;
                                                           ^^^^^^^^^^^^^^^^^^^^^ function type. This type is incompatible with an argument type of. See lib: flow-typed/npm/bluebird_v3.x.x.js:136
 41:     onReject?: ?(error: any) => mixed
                    ^^^^^^^^^^^^^^^^^^^^^^ null. See lib: node_modules/react-native/flow/Promise.js:41

[No file]:0
inconsistent use of library definitions
 24:     onFulfill?: ?(value: R) => Promise<U> | ?U,
                                                 ^^ null. This type is incompatible with. See lib: node_modules/react-native/flow/Promise.js:24
132:   then<U>(onFulfill?: (value: R) => $Promisable<U>, onReject?: (error: any) => $Promisable<U>): Bluebird$Promise<U>;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ some incompatible instantiation of `U`. See lib: flow-typed/npm/bluebird_v3.x.x.js:132

[No file]:0
inconsistent use of library definitions
 24:     onFulfill?: ?(value: R) => Promise<U> | ?U,
                                                 ^^ undefined. This type is incompatible with. See lib: node_modules/react-native/flow/Promise.js:24
132:   then<U>(onFulfill?: (value: R) => $Promisable<U>, onReject?: (error: any) => $Promisable<U>): Bluebird$Promise<U>;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ some incompatible instantiation of `U`. See lib: flow-typed/npm/bluebird_v3.x.x.js:132

[No file]:0
inconsistent use of library definitions
 25:     onReject?: ?(error: any) => Promise<U> | ?U
                                                  ^^ null. This type is incompatible with. See lib: node_modules/react-native/flow/Promise.js:25
132:   then<U>(onFulfill?: (value: R) => $Promisable<U>, onReject?: (error: any) => $Promisable<U>): Bluebird$Promise<U>;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ some incompatible instantiation of `U`. See lib: flow-typed/npm/bluebird_v3.x.x.js:132

[No file]:0
inconsistent use of library definitions
 25:     onReject?: ?(error: any) => Promise<U> | ?U
                                                  ^^ undefined. This type is incompatible with. See lib: node_modules/react-native/flow/Promise.js:25
132:   then<U>(onFulfill?: (value: R) => $Promisable<U>, onReject?: (error: any) => $Promisable<U>): Bluebird$Promise<U>;
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ some incompatible instantiation of `U`. See lib: flow-typed/npm/bluebird_v3.x.x.js:132


Found 9 errors
@chmac
Copy link

chmac commented Jan 14, 2018

Anyone have a workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug libdef Related to a library definition
Projects
None yet
Development

No branches or pull requests

3 participants