Using Flow 0.34.0 I get a lot of errors in core libraries
$ node_modules/.bin/flow version
Flow, a static type checker for JavaScript, version 0.34.0
$ node_modules/.bin/flow
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `dataReceived` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `loadingFailed` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `loadingFinished` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `requestSent` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `responseReceived` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/ReactNative/YellowBox.js:60
60: console.error = function() {
^^^^^^^ object type. Covariant property `error` incompatible with contravariant use in
60: console.error = function() {
^^^^^^^^^^^^^ assignment of property `error`
node_modules/react-native/Libraries/ReactNative/YellowBox.js:68
68: console.warn = function() {
^^^^^^^ object type. Covariant property `warn` incompatible with contravariant use in
68: console.warn = function() {
^^^^^^^^^^^^ assignment of property `warn`
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:35
35: { diff: AttributeDiffer } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:35
35: { diff: AttributeDiffer } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:36
36: { process: AttributePreprocessor };
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:36
36: { process: AttributePreprocessor };
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js:76
76: previousSibling.sibling = child;
^^^^^^^^^^^^^^^^^^^^^^^ assignment of property `sibling`. Property cannot be assigned on any member of intersection type
76: previousSibling.sibling = child;
^^^^^^^^^^^^^^^ intersection
Member 1:
60: export type Fiber = Instance & {
^^^^^^^^ Instance. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Error:
76: previousSibling.sibling = child;
^^^^^^^ property `sibling`. Property not found in
60: export type Fiber = Instance & {
^^^^^^^^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Member 2:
60: export type Fiber = Instance & {
^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^^^^^^^^^^ union: null | string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Member 1:
44: key: null | string,
^^^^ null. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^ null. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Member 2:
44: key: null | string,
^^^^^^ string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^^^ string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
41: tag: TypeOfWork,
^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^^^^^^^^^^ union: null | string
Member 1:
44: key: null | string,
^^^^ null
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^ null
Member 2:
44: key: null | string,
^^^^^^ string
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^^^ string
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
60: export type Fiber = Instance & {
^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
60: export type Fiber = Instance & {
^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ union: null | function type
Member 1:
74: ref: null | (handle : ?Object) => void,
^^^^ null
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^ null
Member 2:
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^ function type
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^ function type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
100: pendingWorkPriority: PriorityLevel,
^^^^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
105: progressedPriority: PriorityLevel,
^^^^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
22: export type UpdateQueue = UpdateQueueNode & {
^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiberUpdateQueue.js:22
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
22: export type UpdateQueue = UpdateQueueNode & {
^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiberUpdateQueue.js:22
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:21
21: fontFamily: ReactPropTypes.string,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:22
22: fontSize: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:23
23: fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:29
29: fontWeight: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:36
36: fontVariant: ReactPropTypes.arrayOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:45
45: textShadowOffset: ReactPropTypes.shape(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:48
48: textShadowRadius: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:53
53: letterSpacing: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:54
54: lineHeight: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:59
59: textAlign: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:65
65: textAlignVertical: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:68
68: textDecorationLine: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:74
74: textDecorationStyle: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:84
84: writingDirection: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
Found 39 errors
Similar errors with 0.35.0:
$ node_modules/.bin/flow
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:275
275: callback.apply(null, args);
^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `apply`. Function cannot be called on possibly null value
275: callback.apply(null, args);
^^^^^^^^ null
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:275
275: callback.apply(null, args);
^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `apply`. Function cannot be called on possibly undefined value
275: callback.apply(null, args);
^^^^^^^^ undefined
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:275
275: callback.apply(null, args);
^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `apply`. Method cannot be called on possibly null value
275: callback.apply(null, args);
^^^^^^^^ null
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:275
275: callback.apply(null, args);
^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `apply`. Method cannot be called on possibly undefined value
275: callback.apply(null, args);
^^^^^^^^ undefined
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `dataReceived` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `loadingFailed` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `loadingFinished` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `requestSent` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `responseReceived` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/ReactNative/YellowBox.js:60
60: console.error = function() {
^^^^^^^ object type. Covariant property `error` incompatible with contravariant use in
60: console.error = function() {
^^^^^^^^^^^^^ assignment of property `error`
node_modules/react-native/Libraries/ReactNative/YellowBox.js:68
68: console.warn = function() {
^^^^^^^ object type. Covariant property `warn` incompatible with contravariant use in
68: console.warn = function() {
^^^^^^^^^^^^ assignment of property `warn`
node_modules/react-native/Libraries/ReactNative/renderApplication.js:36
36: {...initialProps}
^^^^^^^^^^^^ spread of Props. Expected object instead of
36: {...initialProps}
^^^^^^^^^^^^ Props
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:35
35: { diff: AttributeDiffer } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:35
35: { diff: AttributeDiffer } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:36
36: { process: AttributePreprocessor };
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:36
36: { process: AttributePreprocessor };
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js:76
76: previousSibling.sibling = child;
^^^^^^^^^^^^^^^^^^^^^^^ assignment of property `sibling`. Property cannot be assigned on any member of intersection type
76: previousSibling.sibling = child;
^^^^^^^^^^^^^^^ intersection
Member 1:
60: export type Fiber = Instance & {
^^^^^^^^ Instance. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Error:
76: previousSibling.sibling = child;
^^^^^^^ property `sibling`. Property not found in
60: export type Fiber = Instance & {
^^^^^^^^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Member 2:
60: export type Fiber = Instance & {
^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^^^^^^^^^^ union: null | string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Member 1:
44: key: null | string,
^^^^ null. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^ null. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Member 2:
44: key: null | string,
^^^^^^ string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^^^ string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
41: tag: TypeOfWork,
^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^^^^^^^^^^ union: null | string
Member 1:
44: key: null | string,
^^^^ null
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^ null
Member 2:
44: key: null | string,
^^^^^^ string
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^^^ string
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
60: export type Fiber = Instance & {
^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
60: export type Fiber = Instance & {
^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ union: null | function type
Member 1:
74: ref: null | (handle : ?Object) => void,
^^^^ null
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^ null
Member 2:
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^ function type
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^ function type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
100: pendingWorkPriority: PriorityLevel,
^^^^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
105: progressedPriority: PriorityLevel,
^^^^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
22: export type UpdateQueue = UpdateQueueNode & {
^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiberUpdateQueue.js:22
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
22: export type UpdateQueue = UpdateQueueNode & {
^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiberUpdateQueue.js:22
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:21
21: fontFamily: ReactPropTypes.string,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:22
22: fontSize: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:23
23: fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:29
29: fontWeight: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:36
36: fontVariant: ReactPropTypes.arrayOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:45
45: textShadowOffset: ReactPropTypes.shape(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:48
48: textShadowRadius: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:53
53: letterSpacing: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:54
54: lineHeight: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:59
59: textAlign: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:65
65: textAlignVertical: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:68
68: textDecorationLine: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:74
74: textDecorationStyle: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:84
84: writingDirection: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/packager/react-packager/src/Bundler/Bundle.js:323
323: ...super.toJSON(),
^^^^^^^^^^^^^^ super.toJSON(...)
322: return {
^ object literal. Expected object instead of
323: ...super.toJSON(),
^^^^^^^^^^^^^^ mixed
node_modules/react-native/packager/react-packager/src/node-haste/Module.js:198
198: transformOptions = {...transformOptions, extern};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object literal. Expected object instead of
198: transformOptions = {...transformOptions, extern};
^^^^^^^^^^^^^^^^ mixed
node_modules/react-native/packager/react-packager/src/node-haste/Package.js:168
168: return { ...browser, ...rn };
^^^^^^^^^^^^^^^^^^^^^ object literal. Expected object instead of
168: return { ...browser, ...rn };
^^^^^^^ mixed
node_modules/react-native/packager/react-packager/src/node-haste/Package.js:168
168: return { ...browser, ...rn };
^^^^^^^^^^^^^^^^^^^^^ object literal. Expected object instead of
168: return { ...browser, ...rn };
^^ mixed
Found 48 errors
We updated flow to 0.34 and 0.35 in RN 0.39.0-rc.0. You can update to the RC version and it should fix it.
Feel free to reopen if you still get errors.
@janicduplessis still experiencing this with 0.39.0-rc.0 :
loic@Loics-MacBook-Pro-32 î‚° ~/flowTest î‚° node_modules/.bin/flow check .
Skipping /Users/loic/flowTest/flow/: No such file or directory
node_modules/react-native/Libraries/Core/InitializeCore.js:175
175: defineProperty(global, 'WebSocket', () => require('WebSocket'));
^^^^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../node_modules/websocket/package.json", which is outside both your root directory and all of the entries in the [include] section of your .flowconfig. You should either add this directory to the [include] section of your .flowconfig, move your .flowconfig file higher in the project directory tree, or move this package under your Flow root directory.
node_modules/react-native/Libraries/Core/InitializeCore.js:175
175: defineProperty(global, 'WebSocket', () => require('WebSocket'));
^^^^^^^^^^^^^^^^^^^^ WebSocket. Required module not found
node_modules/react-native/Libraries/Utilities/HMRClient.js:30
30: const WebSocket = require('WebSocket');
^^^^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../node_modules/websocket/package.json", which is outside both your root directory and all of the entries in the [include] section of your .flowconfig. You should either add this directory to the [include] section of your .flowconfig, move your .flowconfig file higher in the project directory tree, or move this package under your Flow root directory.
node_modules/react-native/Libraries/Utilities/HMRClient.js:30
30: const WebSocket = require('WebSocket');
^^^^^^^^^^^^^^^^^^^^ WebSocket. Required module not found
Found 4 errors
I did before:
react-native init flowTest
yarn add [email protected]
yarn add [email protected] -D
Could you test if you also get these errors on master (yarn add react-native@facebook/react-native)
just tried, same thing happens with master
Ok, thanks for testing that out
@jeffmo Any idea how to fix this error?
After this plaguing me for a while, I found the fix: update your suppress_comment lines in .flowconfig.
i.e. when upgrading from Flow 0.36.0 to 0.37.0, this commit shows you should update the regex from 0-6 to 0-7. This is extreeeeemely non-obvious, though, and should probably be addressed in the future in a better way. (I updated our regex to be [3-9][0-9] so hopefully it won't be an issue for us again until 1.x.x. I'm not sure if this is a Bad Ideaâ„¢ though, but it unblocks us.)
Version support:
RN 0.38.0 works with Flow 0.33.0.
RN 0.39.2 works with Flow 0.35.0.
RN 0.40.0-rc.4 works with Flow 0.36.0.
RN HEAD (currently f625437ee9f566ecdc65b8a446f22039eaaa88ad, and I'm assuming rc5 onward) works with Flow 0.37.0.
Take your pick! :)
Same issue on RN 0.39.2 and Flow 0.35.0
Getting a lot of errors with flow ^0.37.4, had to install flow-bin to start with and am getting various errors (see below) that occur prior and post suggested regex fixes:
RN 0.39.2
node_modules/react-native/Libraries/Animated/src/AnimatedImplementation.js:1081
1081: return this._interpolation(parentValue);
^^^^ AnimatedInterpolation. This type is incompatible with
235: const val = +interpolations[i++](input);
^^^^^^^^^^^^^^ array type. See: node_modules/react-native/Libraries/Animated/src/Interpolation.js:235
node_modules/react-native/Libraries/Network/NetInfo.js:243
243: /* $FlowFixMe */
^^^^^^^^^^^^^^^^ Error suppressing comment. Unused suppression
node_modules/react-native/Libraries/Network/NetInfo.js:247
247: listener
^^^^^^^^ undefined. This type is incompatible with the expected param type of
197: handler: Function
^^^^^^^^ function type
node_modules/react-native/Libraries/Performance/Systrace.js:216
216: require.Systrace = Systrace;
^^^^^^^^ property `Systrace`. Property not found in
216: require.Systrace = Systrace;
^^^^^^^ object type
node_modules/react-native/local-cli/bundle/output/unbundle/as-indexed-file.js:74
74: //$FlowIssue #14640206
^^^^^^^^^^^^^^^^^^^^^^ Error suppressing comment. Unused suppression
node_modules/react-native/local-cli/bundle/output/unbundle/as-indexed-file.js:116
116: //$FlowIssue #14640206
^^^^^^^^^^^^^^^^^^^^^^ Error suppressing comment. Unused suppression
node_modules/react-native/packager/react-packager/src/Bundler/BundleBase.js:17
17: runBeforeMainModule?: Array<mixed>,
^^^^^ mixed. This type is incompatible with the expected param type of
112: _addRequireCall(moduleId: string) {
^^^^^^ string. See: node_modules/react-native/packager/react-packager/src/Bundler/Bundle.js:112
node_modules/react-native/packager/react-packager/src/node-haste/Cache/index.js:164
164: fieldNames.forEach((field, index) =>
^ call of method `forEach`
34: data: {[field: string]: Promise<mixed>},
^^^^^^^^^^^^^^ Promise. This type is incompatible with
35: static all<Elem, T:Iterable<Elem>>(promises: T): Promise<$TupleMap<T, typeof $await>>;
^^^^^^^^^^^^^^^^^^^^^^^^^^^ mixed. See lib: node_modules/react-native/flow/Promise.js:35
node_modules/react-native/packager/react-packager/src/node-haste/ModuleCache.js:119
119: if (this._packageCache[packagePath]) {
^^^^^^^^^^^ undefined. This type is incompatible with
30: _packageCache: {[filePath: string]: Package};
^^^^^^ string
@IljaDaderko RN 0.39.2 isn't going to work with Flow > 0.35.x at all
@notjosh I'm on RN 0.41 and Flow 0.37.4. I have 469 errors, most of them from node_modules/. What suppress_comment can I use to suppress these errors? My current config for this is:
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
Thanks in advance to anyone who can help. It's almost impossible to use Flow for type checking as is.
My issue turned out to be an entry I added to [options]:
module.file_ext=.ios.js
which was to suppress flow errors caused when using such extensions. Removing this fixed my plethora of errors and I don't see the error I was getting before that made me add that option in the first place so maybe flow now supports .ios.js and .android.js extensions -- though I'm not sure.
I use RN 0.41.2 and Flow 0.41.0, and encounter the same issues. It shows hundreds of errors from flow type check. Most of them are in the node_modules/react-native/Libraries/Components/ folder.
Is there any way to quick fix this (workaround)?
I think the only way to fix this is to upgrade to 0.42. Really sorry about the inconvenience- we are going to be careful with flow errors from here on
I still need to ignore some sources to suppress warnings from node_modules in .flowconfig with RN 0.42:
[ignore]
; https://gist.github.com/xjamundx/ffafa67925db6d7ffc4c86a7fb2bcb45
.*/node_modules/.*[^e]\.json$
.*/node_modules/.*\(lib\|test\).*\.json$
; Temporally ignore the following node modules
.*/node_modules/react-native-experimental-navigation/.*
.*/node_modules/react-native/.*
Still seeing this one in RN 42 when analyzing the react-native-linear-gradient package:
node_modules/react-native/Libraries/Network/NetInfo.js:247
247: listener
^^^^^^^^ undefined. This type is incompatible with the expected param type of
197: handler: Function
^^^^^^^^ function type
Most helpful comment
Getting a lot of errors with flow ^0.37.4, had to install
flow-binto start with and am getting various errors (see below) that occur prior and post suggested regex fixes:RN 0.39.2