告诉我们您正在使用哪些版本:
当我将以下配置添加到 package.json 时,Flow 报告了很多错误
"react-native-router-flux": "^3.30.3",
和 npm 安装
当我卸载 react-native-router-flux 时,流程检查正常
此处出错
$ flow --show-all-errors
node_modules/react-native-experimental-navigation/NavigationAnimatedView.js:155
155: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationAnimatedView.js:170
170: _renderScenes(): Array<?ReactElement> {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationAnimatedView.js:174
174: _renderScene(scene: NavigationScene): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationAnimatedView.js:196
196: _renderOverlay(): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationCard.js:83
83: render(): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationCard.js:111
111: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationCardStack.js:117
117: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationCardStack.js:129
129: _renderScene(props: NavigationSceneRendererProps): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationContainer.js:19
19: ): ReactClass & Object {
^^^^^^^^^^ ReactClass. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationHeader.js:85
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `children`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native-experimental-navigation/NavigationHeader.js:85
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `style`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native-experimental-navigation/NavigationHeader.js:85
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `textStyle`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native-experimental-navigation/NavigationHeader.js:85
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `viewProps`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
85: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native-experimental-navigation/NavigationHeader.js:114
114: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationHeader.js:132
132: _renderLeft(props: NavigationSceneRendererProps): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationHeader.js:141
141: _renderTitle(props: NavigationSceneRendererProps): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationHeader.js:150
150: _renderRight(props: NavigationSceneRendererProps): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationHeader.js:164
164: ): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:41
41: children: ReactElement;
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:40
40: const NavigationContext = require('./NavigationContext');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./NavigationContext. Required module not found
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:45
45: const NavigatorBreadcrumbNavigationBar = require('./NavigatorBreadcrumbNavigationBar');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./NavigatorBreadcrumbNavigationBar. Required module not found
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:46
46: const NavigatorNavigationBar = require('./NavigatorNavigationBar');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./NavigatorNavigationBar. Required module not found
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:47
47: const NavigatorSceneConfigs = require('./NavigatorSceneConfigs');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./NavigatorSceneConfigs. Required module not found
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:234
234: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:256
256: _renderHeader(props: NavigationSceneRendererProps): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:281
281: _renderCard(props: NavigationSceneRendererProps): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationLegacyNavigator.js:328
328: _renderScene(props: NavigationSceneRendererProps): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationPointerEventsContainer.js:55
55: ): ReactClass {
^^^^^^^^^^ ReactClass. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationPointerEventsContainer.js:89
89: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationRootContainer.js:182
182: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in
108: scenes: NavigationScenesReducer([], this.props.navigationState),
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:108
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in
108: scenes: NavigationScenesReducer([], this.props.navigationState),
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:108
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in
127: nextProps.navigationState,
^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:127
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in
127: nextProps.navigationState,
^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:127
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in
98: scenes: NavigationScenesReducer([], this.props.navigationState),
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:98
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in
98: scenes: NavigationScenesReducer([], this.props.navigationState),
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:98
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in
110: nextProps.navigationState,
^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:110
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:72
72: nextState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in
110: nextProps.navigationState,
^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:110
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:73
73: prevState: ?NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in
128: this.props.navigationState
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:128
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:73
73: prevState: ?NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in
128: this.props.navigationState
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:128
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:73
73: prevState: ?NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in
111: this.props.navigationState
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:111
node_modules/react-native-experimental-navigation/NavigationScenesReducer.js:73
73: prevState: ?NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in
111: this.props.navigationState
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:111
node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:94
94: newState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in
138: this.props.navigationState,
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:138
node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:94
94: newState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in
138: this.props.navigationState,
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:138
node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:101
101: ) => ReactElement;
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:110
110: ) => ?ReactElement;
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationView.js:114
114: render(): ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native-experimental-navigation/NavigationView.js:143
143: _renderScene(props: NavigationSceneRendererProps): ?ReactElement {
^^^^^^^^^^^^ ReactElement. Application of polymorphic type needs <list of 1 argument>. (Can use `*` for inferrable ones)
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js:77
77: nextProps.sceneRendererProps.scene.route !==
^^^^^ property `route`. Property not found in
77: nextProps.sceneRendererProps.scene.route !==
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js:78
78: this.props.sceneRendererProps.scene.route
^^^^^ property `route`. Property not found in
78: this.props.sceneRendererProps.scene.route
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js:86
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `children`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js:86
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `style`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js:86
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `textStyle`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js:86
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
47: const NavigationHeaderTitle = ({ children, style, textStyle, viewProps }: Props) => (
^^^^^ property `viewProps`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationHeaderTitle.js:47
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ props of React element `NavigationHeaderTitle`
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js:86
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React element `NavigationHeaderTitle`
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React$Element. This type is incompatible with
110: ) => ?ReactElement;
^^^^^^^^^^^^ union: ReactElement(s). See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:110
Member 1:
110: ) => ?ReactElement;
^^^^^^^^^^^^ ReactElement. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:110
Error:
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React$Element. This type is incompatible with
110: ) => ?ReactElement;
^^^^^^^^^^^^ ReactElement. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:110
Member 2:
110: ) => ?ReactElement;
^^^^^^^^^^^^ ReactElement. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:110
Error:
86: return <NavigationHeaderTitle>{title}</NavigationHeaderTitle>;
^^^^^^^^^^^^^^^^^^^^^^^ React$Element. This type is incompatible with
110: ) => ?ReactElement;
^^^^^^^^^^^^ ReactElement. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:110
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderTitle.js:52
52: // $FlowIssue(>=0.26.0) #11432532
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error suppressing comment. Unused suppression
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:62
62: toValue: navigationState.index,
^^^^^ property `index`. Property not found in
62: toValue: navigationState.index,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:104
104: position: new Animated.Value(this.props.navigationState.index),
^^^^^ property `index`. Property not found in
104: position: new Animated.Value(this.props.navigationState.index),
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:135
135: if (lastProps.navigationState.index !== this.props.navigationState.index) {
^^^^^ property `index`. Property not found in
135: if (lastProps.navigationState.index !== this.props.navigationState.index) {
^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:135
135: if (lastProps.navigationState.index !== this.props.navigationState.index) {
^^^^^ property `index`. Property not found in
135: if (lastProps.navigationState.index !== this.props.navigationState.index) {
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:149
149: const delta = Math.abs(data.value - this.props.navigationState.index);
^^^^^ property `index`. Property not found in
149: const delta = Math.abs(data.value - this.props.navigationState.index);
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:195
195: return renderScene({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
197: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:195
195: return renderScene({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
197: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:220
220: return renderOverlay({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
222: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:220
220: return renderOverlay({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
222: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationAnimatedView.js:226
226: scene: scenes[navigationState.index],
^^^^^ property `index`. Property not found in
226: scene: scenes[navigationState.index],
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationPropTypes.js:106
106: progress: props.progress,
^^^^^^^^ property `progress`. Property not found in
106: progress: props.progress,
^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:17
17: NavigationRoute,
^^^^^^^^^^^^^^^ Named import from module `NavigationTypeDefinition`. This module has no named export called `NavigationRoute`. Did you mean `NavigationState`?
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:39
39: const childState = parentState.routes.find(child => child.key === key);
^^^^^^ property `routes`. Property not found in
39: const childState = parentState.routes.find(child => child.key === key);
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:48
48: const index = parentState.routes.map(child => child.key).indexOf(key);
^^^^^^ property `routes`. Property not found in
48: const index = parentState.routes.map(child => child.key).indexOf(key);
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:56
56: var lastChildren: Array<NavigationRoute> = state.routes;
^^^^^^ property `routes`. Property not found in
56: var lastChildren: Array<NavigationRoute> = state.routes;
^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:68
68: if (state.index <= 0) {
^^^^^ property `index`. Property not found in
68: if (state.index <= 0) {
^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:71
71: const lastChildren = state.routes;
^^^^^^ property `routes`. Property not found in
71: const lastChildren = state.routes;
^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:84
84: const routes = nextChildren || parentState.routes;
^^^^^^ property `routes`. Property not found in
84: const routes = nextChildren || parentState.routes;
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:85
85: const index = nextIndex == null ? parentState.index : nextIndex;
^^^^^ property `index`. Property not found in
85: const index = nextIndex == null ? parentState.index : nextIndex;
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:86
86: if (routes === parentState.routes && index === parentState.index) {
^^^^^^ property `routes`. Property not found in
86: if (routes === parentState.routes && index === parentState.index) {
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:86
86: if (routes === parentState.routes && index === parentState.index) {
^^^^^ property `index`. Property not found in
86: if (routes === parentState.routes && index === parentState.index) {
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:96
96: function set(state: ?NavigationState, key: string, nextChildren: Array<NavigationRoute>, nextIndex: number): NavigationState {
^^^^^^^^^^^^^^^ property `key`. Property not found in
98: return {
^ object literal
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:96
96: function set(state: ?NavigationState, key: string, nextChildren: Array<NavigationRoute>, nextIndex: number): NavigationState {
^^^^^^^^^^^^^^^ property `key`. Property not found in
105: return {
^ object literal
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:110
110: if (nextChildren === parentState.routes && nextIndex === parentState.index) {
^^^^^^ property `routes`. Property not found in
110: if (nextChildren === parentState.routes && nextIndex === parentState.index) {
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:110
110: if (nextChildren === parentState.routes && nextIndex === parentState.index) {
^^^^^ property `index`. Property not found in
110: if (nextChildren === parentState.routes && nextIndex === parentState.index) {
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:122
122: if (parentState && parentState.index === index) {
^^^^^ property `index`. Property not found in
122: if (parentState && parentState.index === index) {
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:136
136: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^ property `routes`. Property not found in
136: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:136
136: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^ property `routes`. Property not found in
136: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:152
152: const routes = [...parentState.routes];
^^^^^^ property `routes`. Property not found in
152: const routes = [...parentState.routes];
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:153
153: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^ property `routes`. Property not found in
153: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:153
153: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^ property `routes`. Property not found in
153: const index = parentState.routes.indexOf(parentState.routes.find(child => child.key === key));
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationStateUtils.js:170
170: const routes = [...parentState.routes];
^^^^^^ property `routes`. Property not found in
170: const routes = [...parentState.routes];
^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:31
31: NavigationTransitionConfigurator,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Named import from module `NavigationTypeDefinition`. This module has no named export called `NavigationTransitionConfigurator`.
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:96
96: position: new Animated.Value(this.props.navigationState.index),
^^^^^ property `index`. Property not found in
96: position: new Animated.Value(this.props.navigationState.index),
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:150
150: if (nextProps.navigationState.index !== this.props.navigationState.index) {
^^^^^ property `index`. Property not found in
150: if (nextProps.navigationState.index !== this.props.navigationState.index) {
^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:150
150: if (nextProps.navigationState.index !== this.props.navigationState.index) {
^^^^^ property `index`. Property not found in
150: if (nextProps.navigationState.index !== this.props.navigationState.index) {
^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:199
199: return renderScene({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
201: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:199
199: return renderScene({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
201: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:224
224: const route = navigationState.routes[navigationState.index];
^^^^^^ property `routes`. Property not found in
224: const route = navigationState.routes[navigationState.index];
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:224
224: const route = navigationState.routes[navigationState.index];
^^^^^ property `index`. Property not found in
224: const route = navigationState.routes[navigationState.index];
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:227
227: return (!scene.isStale && scene.route === route) ?
^^^^^ property `route`. Property not found in
227: return (!scene.isStale && scene.route === route) ?
^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:234
234: return renderOverlay({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `children`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
236: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/NavigationTransitioner.js:234
234: return renderOverlay({
^ function call
58: navigationState: NavigationParentState,
^^^^^^^^^^^^^^^^^^^^^ property `index`. Property not found in. See: node_modules/react-native-experimental-navigation/NavigationTypeDefinition.js:58
236: navigationState,
^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationFindReducer.js:21
21: NavigationRoute,
^^^^^^^^^^^^^^^ Named import from module `NavigationTypeDefinition`. This module has no named export called `NavigationRoute`. Did you mean `NavigationState`?
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationScenesReducer.js:18
18: NavigationRoute,
^^^^^^^^^^^^^^^ Named import from module `NavigationTypeDefinition`. This module has no named export called `NavigationRoute`. Did you mean `NavigationState`?
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationScenesReducer.js:70
70: areRoutesShallowEqual(one.route, two.route)
^^^^^ property `route`. Property not found in
70: areRoutesShallowEqual(one.route, two.route)
^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationScenesReducer.js:70
70: areRoutesShallowEqual(one.route, two.route)
^^^^^ property `route`. Property not found in
70: areRoutesShallowEqual(one.route, two.route)
^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationScenesReducer.js:115
115: nextState.routes.forEach((route, index) => {
^^^^^^ property `routes`. Property not found in
115: nextState.routes.forEach((route, index) => {
^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationScenesReducer.js:135
135: freshScenes.set(key, scene);
^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `set`
102: const freshScenes: Map<string, NavigationScene> = new Map();
^^^^^^^^^^^^^^^ property `navigationState`. Property not found in
135: freshScenes.set(key, scene);
^^^^^ object literal
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationScenesReducer.js:140
140: prevState.routes.forEach((route: NavigationRoute, index) => {
^^^^^^ property `routes`. Property not found in
140: prevState.routes.forEach((route: NavigationRoute, index) => {
^^^^^^^^^ object type
node_modules/react-native/Libraries/NavigationExperimental/Reducer/NavigationScenesReducer.js:145
145: staleScenes.set(key, {
^ call of method `set`
103: const staleScenes: Map<string, NavigationScene> = new Map();
^^^^^^^^^^^^^^^ property `navigationState`. Property not found in
145: staleScenes.set(key, {
^ object literal
Found 107 errors
$ npm uninstall react-native-router-flux --save
$ flow --show-all-errors
为 /Users/zy/Workspaces/NovelDownloaderReader 启动 Flow 服务器
生成的流服务器(子 pid=77538)
日志将转到 /private/tmp/flow/zSUserszSzZyzSWorkspaceszSNovelDownloaderReader.log
没有错误!
这是因为 RNRF 将实验性导航 API 作为一个单独的包引入,(几乎)复制了 RN 本身包含的许多声明,并与其他声明冲突(理由:https://github.com/aksonov/react-native-router-通量/问题/786)。
不幸的是,即使 RN 自己的NavigationExperimental
被忽略,新包也没有完全进行类型检查,部分原因是因为公共声明(例如ReactElement
)以及流本身的版本在 RN 中发生了变化。导航的东西被复制出来并为 RNRF 冻结。
所以到目前为止我发现的唯一“解决方法”是通过添加流忽略react-native-experimental-navigation
包.*/node_modules/react-native-experimental-navigation/.*
到[ignore]
您的第.flowconfig
。
谢谢@rh389。 在 NavigationExperimental 上游稳定之前,这是我们无法解决的问题。 但是,未来的 Google 搜索者可以实施上述建议!
最有用的评论
这是因为 RNRF 将实验性导航 API 作为一个单独的包引入,(几乎)复制了 RN 本身包含的许多声明,并与其他声明冲突(理由:https://github.com/aksonov/react-native-router-通量/问题/786)。
不幸的是,即使 RN 自己的
NavigationExperimental
被忽略,新包也没有完全进行类型检查,部分原因是因为公共声明(例如ReactElement
)以及流本身的版本在 RN 中发生了变化。导航的东西被复制出来并为 RNRF 冻结。所以到目前为止我发现的唯一“解决方法”是通过添加流忽略
react-native-experimental-navigation
包.*/node_modules/react-native-experimental-navigation/.*
到
[ignore]
您的第.flowconfig
。