Errors in flow
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes, kind of.
Environment
Environment: OS: Windows 10 Node: 8.9.4 Yarn: Not Found npm: 5.5.1 Watchman: Not Found Xcode: N/A Android Studio: Not Found
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.53.3 => 0.53.3
Steps to Reproduce
Create a new project create-react-native-app. Update react-native to 0.53.3 in package json. Add flow-bin 0.66.0. Clear node_modules. Clear npm cache. Do npm install. Add & run npm run flow.
Expected Behavior
Errors from my code, and 3rd party libraries.
Actual Behavior
Errors all over the place from react-native, metro. etc.
Error ----------------------------------------------- node_modules/react-native/Libraries/CameraRoll/CameraRoll.js:120:5
`ReactPropsChainableTypeChecker` [1] is not a React propType.
node_modules/react-native/Libraries/CameraRoll/CameraRoll.js:120:5
v-----------------------------
120| createStrictShapeTypeChecker({
121| node: createStrictShapeTypeChecker({
122| type: PropTypes.string.isRequired,
123| group_name: PropTypes.string.isRequired,
124| image: createStrictShapeTypeChecker({
125| uri: PropTypes.string.isRequired,
126| height: PropTypes.number.isRequired,
127| width: PropTypes.number.isRequired,
128| isStored: PropTypes.bool,
129| playableDuration: PropTypes.number.isRequired,
130| }).isRequired,
131| timestamp: PropTypes.number.isRequired,
132| location: createStrictShapeTypeChecker({
133| latitude: PropTypes.number,
134| longitude: PropTypes.number,
135| altitude: PropTypes.number,
136| heading: PropTypes.number,
137| speed: PropTypes.number,
138| }),
139| }).isRequired,
140| }),
-^
References:
node_modules/react-native/Libraries/Utilities/createStrictShapeTypeChecker.js:19:4
19| ): ReactPropsChainableTypeChecker {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1]
Error ------------------------------------------------------ node_modules/react-native/Libraries/Lists/FlatList.js:632:9
Cannot create `MetroListView` element because:
- null or undefined [1] is incompatible with boolean [2] in property `refreshing`.
- null or undefined [3] is incompatible with boolean [2] in property `refreshing`.
- read-only array type [4] is incompatible with array type [5] in property `items`.
node_modules/react-native/Libraries/Lists/FlatList.js:632:9
v-------------
632| <MetroListView
633| {...this.props}
634| items={this.props.data}
635| ref={this._captureRef}
636| />
-^
References:
node_modules/react-native/Libraries/Lists/FlatList.js:190:16
190| refreshing?: ?boolean,
^^^^^^^^ [1]
node_modules/react-native/Libraries/Lists/MetroListView.js:46:16
46| refreshing?: boolean,
^^^^^^^ [2]
node_modules/react-native/Libraries/Lists/VirtualizedList.js:179:16
179| refreshing?: ?boolean,
^^^^^^^^ [3]
node_modules/react-native/Libraries/Lists/FlatList.js:73:10
73| data: ?$ReadOnlyArray<ItemT>,
^^^^^^^^^^^^^^^^^^^^^ [4]
node_modules/react-native/Libraries/Lists/MetroListView.js:34:12
34| items?: ?Array<Item>, // By default, an Item is assumed to be {key: string}
^^^^^^^^^^^ [5]
Error -------------------------------------------------- node_modules/react-native/Libraries/Lists/SectionList.js:331:12
Cannot create `List` element because:
- null or undefined [1] is incompatible with boolean [2] in property `refreshing`.
- null or undefined [3] is incompatible with boolean [2] in property `refreshing`.
- null or undefined [4] is incompatible with boolean [2] in property `refreshing`.
- undefined [5] is incompatible with `renderItemType` [6] in property `renderItem`.
node_modules/react-native/Libraries/Lists/SectionList.js:331:12
331| return <List {...this.props} ref={this._captureRef} />;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
References:
node_modules/react-native/Libraries/Lists/SectionList.js:165:16
165| refreshing?: ?boolean,
^^^^^^^^ [1]
node_modules/react-native/Libraries/Lists/MetroListView.js:46:16
46| refreshing?: boolean,
^^^^^^^ [2]
node_modules/react-native/Libraries/Lists/VirtualizedList.js:179:16
179| refreshing?: ?boolean,
^^^^^^^^ [3]
node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js:119:16
119| refreshing?: ?boolean,
^^^^^^^^ [4]
node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js:68:16
v-------
68| renderItem?: (info: {
69| item: Item,
70| index: number,
71| section: SectionT,
72| separators: {
73| highlight: () => void,
74| unhighlight: () => void,
75| updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,
76| },
77| }) => ?React.Element<any>,
------------------------^ [5]
node_modules/react-native/Libraries/Lists/VirtualizedList.js:57:15
57| renderItem: renderItemType,
^^^^^^^^^^^^^^ [6]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:12 (6 by maintainers)
Top Results From Across the Web
How to Solve Salesforce Flow Errors
Flow Errors Caused by Inactive Users ... Errors may sometimes occur if a user is inactive. This happens most commonly when someone leaves...
Read more >Error Suppressions - JavaScript. Flow
Flow reports many different kinds of errors for many common programming mistakes, but not every JavaScript pattern can be understood by Flow.
Read more >Find and fix errors with Flow Checker in Power Automate
View errors or warnings in the checker; Learn to fix errors and warnings; Learn more. Flow Checker in Power Automate promotes higher quality ......
Read more >Common Salesforce Flow Errors and How to Solve Them
Salesforce Flow errors happen all the time. However, you can still manage a clean user experience even when these errors occur.
Read more >Emails About Flow Errors - Salesforce Help
Emails About Flow Errors. Every time a flow interview fails, Salesforce sends an error email in the default language of the user who...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m afraid not. FWIW, 0.54-stable does not show this issue: https://circleci.com/gh/facebook/react-native/tree/0.54-stable
I was also getting this issue when upgrading to RN 0.55.3 using flow version 0.67.1. I solved the problem by actually copying there flow suppressing comments within there
.flowconfig
into my projects.flowconfig
. These were the lines I copied from RN’s.flowconfig
to mine:assuming you have those suppress types (
$FlowFixMe
,$FlowIssue
) already defined which looks like the following:Hope that helps!