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

Newly initialized react native project has flow errors #11655

Closed
drewwyatt opened this issue Dec 28, 2016 · 26 comments
Closed

Newly initialized react native project has flow errors #11655

drewwyatt opened this issue Dec 28, 2016 · 26 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@drewwyatt
Copy link

Description

The long and short of it is, I'm getting flow errors on brand new projects created with the react native cli (version 2.0.1). Do I have a weird version mismatch or something?

Reproduction

drew.wyatt$ react-native --version
react-native-cli: 2.0.1
react-native: 0.39.2

drew.wyatt$ flow version
Flow, a static type checker for JavaScript, version 0.35.0
Drew-Wyatt:Projects drew.wyatt$ react-native init Whatever
   This will walk you through creating a new React Native project in /Users/drew.wyatt/Projects/Whatever
   Using yarn v0.16.1
   Installing react-native...
   yarn add v0.16.1
   info No lockfile found.
   [1/4] 🔍  Resolving packages...
   warning react-native > xcode > [email protected]: use uuid module instead
   [2/4] 🚚  Fetching packages...
   [3/4] 🔗  Linking dependencies...
   warning Unmet peer dependency "react@~15.4.0-rc.4".
   [4/4] 📃  Building fresh packages...
   success Saved lockfile.
   success Saved 466 new dependencies.
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   │  └─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   ├─ [email protected]
   └─ [email protected]
   ✨  Done in 7.54s.
   Setting up new React Native app in /Users/drew.wyatt/Projects/Whatever
   Installing React...
   Installing Jest...
   npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
   npm WARN prefer global [email protected] should be installed with -g
   To run your app on iOS:
      react-native run-ios
      - or -
      Open ios/Whatever.xcodeproj in Xcode
      Hit the Run button
   To run your app on Android:
      Have an Android emulator running (quickest way to get started), or a device connected
      react-native run-android
   Drew-Wyatt:Projects drew.wyatt$ cd Whatever/
   Drew-Wyatt:Whatever drew.wyatt$ flow
   Launching Flow server for /Users/drew.wyatt/Projects/Whatever
   Spawned flow server (pid=99638)
   Logs will go to /private/tmp/flow/zSUserszSdrew.wyattzSProjectszSWhatever.log
   node_modules/react-native/local-cli/server/util/inspectorProxy.js:43
    43: const querystring = require('querystring');
                            ^^^^^^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/querystring/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/local-cli/server/util/inspectorProxy.js:43
    43: const querystring = require('querystring');
                            ^^^^^^^^^^^^^^^^^^^^^^ querystring. Required module not found
   
   node_modules/react-native/local-cli/server/util/inspectorProxy.js:45
    45: const parseUrl = require('url').parse;
                         ^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/url/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/local-cli/util/Config.js:13
    13: const assert = require('assert');
                       ^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/assert/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/packager/react-packager/src/Bundler/index.js:14
    14: const assert = require('assert');
                       ^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/assert/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/packager/react-packager/src/JSTransformer/index.js:19
    19: const util = require('util');
                     ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/util/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/packager/react-packager/src/Logger/index.js:17
    17: const {EventEmitter} = require('events');
                               ^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/events/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/packager/react-packager/src/node-haste/fastfs.js:17
    17: const {EventEmitter} = require('events');
                               ^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/events/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/packager/react-packager/src/node-haste/index.js:33
    33: const util = require('util');
                     ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../node_modules/util/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.
   
   
   Found 9 errors

Solution

Right now I'm just not using flow and ignoring the issues. I've tried switching some versions around but keep coming up empty handed.

Additional Information

  • React Native CLI version: 2.0.1
  • React Native version: 0.39.2
  • Flow version: 0.35.0
  • Platform: Development Environment
  • Operating System: macOS Sierra Version 10.12.2
@antoniocanaveral
Copy link

Same Error:
React Native CLI version: 2.0.1
React Native version: 0.40.0
Yosemite

@itajenglish
Copy link

Having the same issue!

@frapontillo
Copy link

Same class of issue here, flow keeps reporting errors in files under node_modules/react-native/.

flow: 0.37.4
react-native-cli: 2.0.1
react-native: 0.40.0

@cristiancedenogallego
Copy link

+1

@techrah
Copy link

techrah commented Feb 21, 2017

flow: 0.37.4, react: 15.4.2, react-native: 0.41.2

Flow has been completely broken for me since around RN 0.39.0. Not only do I get lots of errors stemming from node_modules/ but it no longer reports anything for my actual project.

@sahrens
Copy link
Contributor

sahrens commented Feb 22, 2017

Hmm, I can't repro - can anyone else still repro on the latest everything?

$ react-native init FlowTest
This will walk you through creating a new React Native project in /Users/sahrens/react-native/FlowTest
Installing react-native package from npm...
Setting up new React Native app in /Users/sahrens/react-native/FlowTest
Installing React...
[email protected] /Users/sahrens/react-native/FlowTest
└── [email protected]

Installing Jest...
[email protected] /Users/sahrens/react-native/FlowTest
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │   ├─┬ [email protected]
│ │ │   │ └── [email protected]
│ │ │   └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│   └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   ├── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ └── [email protected]
│   │ ├─┬ [email protected]
│   │ │ └─┬ [email protected]
│   │ │   └── [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├── [email protected]
│   │ │ ├── [email protected]
│   │ │ └─┬ [email protected]
│   │ │   └── [email protected]
│   │ ├── [email protected]
│   │ ├─┬ [email protected]
│   │ │ └─┬ [email protected]
│   │ │   ├── [email protected]
│   │ │   └─┬ [email protected]
│   │ │     └── [email protected]
│   │ └─┬ [email protected]
│   │   ├─┬ [email protected]
│   │   │ └── [email protected]
│   │   └── [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   ├─┬ [email protected]
│   │ ├── [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ └── [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ ├─┬ [email protected]
│   │ │ │ │ └── [email protected]
│   │ │ │ └─┬ [email protected]
│   │ │ │   └─┬ [email protected]
│   │ │ │     └── [email protected]
│   │ │ └── [email protected]
│   │ ├── [email protected]
│   │ └─┬ [email protected]
│   │   └─┬ [email protected]
│   │     └─┬ [email protected]
│   │       └── [email protected]
│   ├─┬ [email protected]
│   │ ├── [email protected]
│   │ └─┬ [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├─┬ [email protected]
│   │   │ ├── [email protected]
│   │   │ ├── [email protected]
│   │   │ ├─┬ [email protected]
│   │   │ │ ├── [email protected]
│   │   │ │ ├── [email protected]
│   │   │ │ ├── [email protected]
│   │   │ │ ├── [email protected]
│   │   │ │ └── [email protected]
│   │   │ └── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├── [email protected]
│   │   ├─┬ [email protected]
│   │   │ └── [email protected]
│   │   ├─┬ [email protected]
│   │   │ ├── [email protected]
│   │   │ └── [email protected]
│   │   └── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ └── [email protected]
│   │ └─┬ [email protected]
│   │   ├── [email protected]
│   │   └─┬ [email protected]
│   │     └── [email protected]
│   ├─┬ [email protected]
│   │ ├── [email protected]
│   │ └── [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ └── [email protected]
│   │ │ └─┬ [email protected]
│   │ │   └─┬ [email protected]
│   │ │     └── [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ └── [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ └── [email protected]
│   │ ├── [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ └─┬ [email protected]
│   │ │ │   ├── [email protected]
│   │ │ │   ├─┬ [email protected]
│   │ │ │   │ └── [email protected]
│   │ │ │   └── [email protected]
│   │ │ ├── [email protected]
│   │ │ └── [email protected]
│   │ ├─┬ [email protected]
│   │ │ └── [email protected]
│   │ ├── [email protected]
│   │ ├── [email protected]
│   │ ├── [email protected]
│   │ ├── [email protected]
│   │ ├── [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ └── [email protected]
│   │ │ └── [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ └── [email protected]
│   │ │ └── [email protected]
│   │ └─┬ [email protected]
│   │   ├── [email protected]
│   │   └── [email protected]
│   ├─┬ [email protected]
│   │ ├── [email protected]
│   │ └── [email protected]
│   └── [email protected]
└── [email protected]

To run your app on iOS:
   cd /Users/sahrens/react-native/FlowTest
   react-native run-ios
   - or -
   Open ios/FlowTest.xcodeproj in Xcode
   Hit the Run button
To run your app on Android:
   cd /Users/sahrens/react-native/FlowTest
   Have an Android emulator running (quickest way to get started), or a device connected
   react-native run-android
Wed Feb 22 13:24:20 [~/react-native  (master)]
$ cd FlowTest/
Wed Feb 22 13:27:27 [~/react-native/FlowTest  (master)]
$ flow
Launching Flow server for /Users/sahrens/react-native/FlowTest
Spawned flow server (pid=72082)
Logs will go to /private/tmp/flow/zSUserszSsahrenszSreact-nativezSFlowTest.log
No errors!
Wed Feb 22 13:27:46 [~/react-native/FlowTest  (master)]
$ react-native --version
0.41.2
Wed Feb 22 13:28:44 [~/react-native/FlowTest  (master)]
$ flow version
Flow, a static type checker for JavaScript, version 0.37.4

@sahrens
Copy link
Contributor

sahrens commented Feb 23, 2017

This should get fixed by #12533 (or at least won't get broken again when the next version is released...)

@techrah
Copy link

techrah commented Feb 23, 2017

@sahrens Thanks for testing on your end. For me, it turned out to be something I added to my .flowconfig to solve an issue that worked at that time (see #11099) but has since caused the issues I was having; it doesn't seem to be needed by flow anymore anyway so I was able to simply remove it.

@drewwyatt
Copy link
Author

I started the process again and am still having issues. This is on a new-newly initialized project:

node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:160
160:       this._callbacks[this._callbackID++] = onFail;
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment of computed property/element. Flow will only let you modify a tuple if it knows exactly which element of the tuple you are mutating. Unsafe mutation of
160:       this._callbacks[this._callbackID++] = onFail;
           ^^^^^^^^^^^^^^^ tuple type

node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:162
162:       this._callbacks[this._callbackID++] = onSucc;
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment of computed property/element. Flow will only let you modify a tuple if it knows exactly which element of the tuple you are mutating. Unsafe mutation of
162:       this._callbacks[this._callbackID++] = onSucc;
           ^^^^^^^^^^^^^^^ tuple type

node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:273
273:     this._callbacks[cbID & ~1] = null;
         ^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment of computed property/element. Flow will only let you modify a tuple if it knows exactly which element of the tuple you are mutating. Unsafe mutation of
273:     this._callbacks[cbID & ~1] = null;
         ^^^^^^^^^^^^^^^ tuple type

node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:274
274:     this._callbacks[cbID |  1] = null;
         ^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment of computed property/element. Flow will only let you modify a tuple if it knows exactly which element of the tuple you are mutating. Unsafe mutation of
274:     this._callbacks[cbID |  1] = null;
         ^^^^^^^^^^^^^^^ tuple type

node_modules/react-native/Libraries/Core/Timers/JSTimersExecution.js:115
115:         JSTimersExecution.errors.push(e);
                                      ^^^^ property `push`. Property not found in
115:         JSTimersExecution.errors.push(e);
             ^^^^^^^^^^^^^^^^^^^^^^^^ $ReadOnlyArray

node_modules/react-native/Libraries/Network/XMLHttpRequest.js:396
396:     this._subscriptions = [];
         ^^^^^^^^^^^^^^^^^^^ assignment of property `_subscriptions`
396:     this._subscriptions = [];
                               ^^ empty array literal. Tuple arity mismatch. This tuple has 0 elements and cannot flow to the 1 elements of
396:     this._subscriptions = [];
         ^^^^^^^^^^^^^^^^^^^ tuple type

node_modules/react-native/Libraries/Network/XMLHttpRequest.js:460
460:     this._subscriptions.push(RCTNetworking.addListener(
                             ^^^^ property `push`. Property not found in
460:     this._subscriptions.push(RCTNetworking.addListener(
         ^^^^^^^^^^^^^^^^^^^ $ReadOnlyArray

node_modules/react-native/Libraries/Network/XMLHttpRequest.js:464
464:     this._subscriptions.push(RCTNetworking.addListener(
                             ^^^^ property `push`. Property not found in
464:     this._subscriptions.push(RCTNetworking.addListener(
         ^^^^^^^^^^^^^^^^^^^ $ReadOnlyArray

node_modules/react-native/Libraries/Network/XMLHttpRequest.js:468
468:     this._subscriptions.push(RCTNetworking.addListener(
                             ^^^^ property `push`. Property not found in
468:     this._subscriptions.push(RCTNetworking.addListener(
         ^^^^^^^^^^^^^^^^^^^ $ReadOnlyArray

node_modules/react-native/Libraries/Network/XMLHttpRequest.js:472
472:     this._subscriptions.push(RCTNetworking.addListener(
                             ^^^^ property `push`. Property not found in
472:     this._subscriptions.push(RCTNetworking.addListener(
         ^^^^^^^^^^^^^^^^^^^ $ReadOnlyArray

node_modules/react-native/Libraries/Network/XMLHttpRequest.js:476
476:     this._subscriptions.push(RCTNetworking.addListener(
                             ^^^^ property `push`. Property not found in
476:     this._subscriptions.push(RCTNetworking.addListener(
         ^^^^^^^^^^^^^^^^^^^ $ReadOnlyArray

node_modules/react-native/Libraries/Network/XMLHttpRequest.js:480
480:     this._subscriptions.push(RCTNetworking.addListener(
                             ^^^^ property `push`. Property not found in
480:     this._subscriptions.push(RCTNetworking.addListener(
         ^^^^^^^^^^^^^^^^^^^ $ReadOnlyArray

node_modules/react-native/Libraries/ReactNative/requireNativeComponent.js:115
115:   return colors && colors.map(processColor);
                        ^^^^^^^^^^^^^^^^^^^^^^^^ array type. Only tuples and array literals with known elements can flow to
114: function processColorArray(colors: []): [] {
                                             ^^ tuple type

node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiberCompleteWork.js:82
 82:       // $FlowFixMe: Refinement issue. If it is not a Fiber or null, it is a yield
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error suppressing comment. Unused suppression

node_modules/react-native/local-cli/server/middleware/heapCapture/src/AggrowTable.jsx:50
 50:     document.body.addEventListener('keydown', this.keydown);
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `addEventListener`. Method cannot be called on possibly null value
 50:     document.body.addEventListener('keydown', this.keydown);
         ^^^^^^^^^^^^^ null

node_modules/react-native/local-cli/server/middleware/heapCapture/src/AggrowTable.jsx:64
 64:     document.body.removeEventListener('keydown', this.keydown);
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `removeEventListener`. Method cannot be called on possibly null value
 64:     document.body.removeEventListener('keydown', this.keydown);
         ^^^^^^^^^^^^^ null

node_modules/react-native/local-cli/server/util/inspectorProxy.js:43
 43: const querystring = require('querystring');
                         ^^^^^^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/querystring/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/local-cli/server/util/inspectorProxy.js:43
 43: const querystring = require('querystring');
                         ^^^^^^^^^^^^^^^^^^^^^^ querystring. Required module not found

node_modules/react-native/local-cli/server/util/inspectorProxy.js:45
 45: const parseUrl = require('url').parse;
                      ^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/url/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/local-cli/util/Config.js:13
 13: const assert = require('assert');
                    ^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/assert/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/packager/react-packager/src/Bundler/index.js:14
 14: const assert = require('assert');
                    ^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/assert/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/packager/react-packager/src/JSTransformer/index.js:19
 19: const util = require('util');
                  ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/util/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/packager/react-packager/src/Logger/index.js:17
 17: const {EventEmitter} = require('events');
                            ^^^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/events/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/packager/react-packager/src/ModuleGraph/worker/optimize-module.js:74
 74:   return babel.transform(code, {
              ^ call of method `transform`
 76:       [constantFolding],
           ^^^^^^^^^^^^^^^^^ array literal. This type is incompatible with
 59:   plugins?: Array<string | Object | InlinePlugin>,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ union: string | object type | InlinePlugin. See lib: node_modules/react-native/flow/babel.js.flow:59
  Member 1:
   59:   plugins?: Array<string | Object | InlinePlugin>,
                         ^^^^^^ string. See lib: node_modules/react-native/flow/babel.js.flow:59
  Error:
   76:       [constantFolding],
             ^^^^^^^^^^^^^^^^^ array literal. This type is incompatible with
   59:   plugins?: Array<string | Object | InlinePlugin>,
                         ^^^^^^ string. See lib: node_modules/react-native/flow/babel.js.flow:59
  Member 2:
   59:   plugins?: Array<string | Object | InlinePlugin>,
                                  ^^^^^^ object type. See lib: node_modules/react-native/flow/babel.js.flow:59
  Error:
   76:       [constantFolding],
             ^^^^^^^^^^^^^^^^^ array literal. This type is incompatible with
   59:   plugins?: Array<string | Object | InlinePlugin>,
                                  ^^^^^^ object type. See lib: node_modules/react-native/flow/babel.js.flow:59
  Member 3:
   59:   plugins?: Array<string | Object | InlinePlugin>,
                                           ^^^^^^^^^^^^ InlinePlugin. See lib: node_modules/react-native/flow/babel.js.flow:59
  Error:
   76:       [constantFolding],
             ^^^^^^^^^^^^^^^^^ array literal. Tuple arity mismatch. This tuple has 1 elements and cannot flow to the 2 elements of
   59:   plugins?: Array<string | Object | InlinePlugin>,
                                           ^^^^^^^^^^^^ tuple type. See lib: node_modules/react-native/flow/babel.js.flow:59

node_modules/react-native/packager/react-packager/src/Server/index.js:25
 25: const url = require('url');
                 ^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/url/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/packager/react-packager/src/lib/TerminalReporter.js:18
 18: const util = require('util');
                  ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/util/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/packager/react-packager/src/lib/reporting.js:15
 15: const util = require('util');
                  ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/util/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/packager/react-packager/src/lib/terminal.js:16
 16: const util = require('util');
                  ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/util/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/packager/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js:17
 17: const util = require('util');
                  ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/util/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/packager/react-packager/src/node-haste/index.js:32
 32: const util = require('util');
                  ^^^^^^^^^^^^^^^ This modules resolves to "<<PROJECT_ROOT>>/../../../node_modules/util/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.


Found 30 errors

@techrah
Copy link

techrah commented Feb 28, 2017

@drewwyatt Can you specify your RN version, flow version and post your .flowconfig file?

@sudotliu
Copy link

I'm having issues using numerous flow versions with RN as well. Hundreds of errors in node_modules/react-native each time with numerous different versions of flow including the latest.

I will probably just rely on PropTypes for similar effect in the meantime, but it's pretty bad practice to even mention a tool like Flow (see https://facebook.github.io/react/docs/typechecking-with-proptypes.html) when there are so many errors out of the box in the core project and no clear way to circumvent them.

This is not the first ticket of this nature and past tickets have even claimed that upgrading to RN 0.42 will fix the issue, but I have not found that to be true as I am on 0.42 and have tried several things including using the .flowconfig in the RN project itself and the Flow version listed therein.

Perhaps I'm misunderstanding something about Flow, but if not, please either treat this issue more seriously (maybe add a flow run to your CI?) or stop promoting Flow until your own project passes or at least suppresses your own errors. This has been a waste of time for everyone who has come across the string of tickets raising this issue.

@gogumai
Copy link

gogumai commented Mar 28, 2017

I was having the same problem.

But then I realised that on a fresh react-native install, the .flowconfig file stated a specific version at the end of the file (in my case ^0.38.0). So then I installed flow-bin with that same version.

Previously I was trying the oposite direction (install latest flow-bin version and then updating that version on the .flowconfig file).

@techrah
Copy link

techrah commented Mar 28, 2017

If you use brew...

I install flow via brew on macOS and it's not possible to pick the version you want to install. If you upgraded your flow version but still have the older one installed you can switch back to it via something like brew switch flow 0.38.0 otherwise, you'll need to get the older version elsewhere.

I've created a brew tap for those who still need version 0.38.0. To install it:

brew tap ryanhomer/flow
brew install [email protected]

@aaronjensen
Copy link

It seems like react-native should target a specific flow version rather than a ^ version. At least use ~. Minor flow versions have breaking changes all of the time, so it doesn't make sense to allow the latest minor version to install when it hasn't been tested.

@Kureev
Copy link
Contributor

Kureev commented Apr 5, 2017

I had the same problem using [email protected]. Rolling back to 0.38 solved the issue.

@mediaxtend
Copy link

@Kureev, it solved the issue for me too.
I added .*/Libraries/.*/__flowtests__/.* to the [ignore] section of the .flowconfig to remove errors generated by some files of the react-native package (in [email protected]).

@Kureev
Copy link
Contributor

Kureev commented Apr 7, 2017

@mediaxtend thanks! If it works, then we need to update our react-native init template with your solution.

UPD: I tried your solution, but it doesn't seem to work 😞

...
98 more errors (only 50 out of 148 errors displayed)

@ankittyagi
Copy link

ankittyagi commented Apr 11, 2017

Facing the same issue. Anyone resolved it ?

@mediaxtend
Copy link

RN 0.43.3 now support [email protected].
This works:

$ react-native init MyRNProject
$ cd MyRNProject/
$ npm i -SD [email protected]
$ ./node_modules/.bin/flow

@jurmous
Copy link

jurmous commented Apr 11, 2017

Same issue. I resolved it by going back to 0.40 and adding .*/Libraries/.*/__flowtests__/.* to ignore

@ButuzGOL
Copy link

ButuzGOL commented May 8, 2017

i also getting this problem because i have in folder up node_modules when i remove node_modules it pass

@Hypnosphi
Copy link

Hypnosphi commented May 30, 2017

Still applies

$ react-native -v
react-native-cli: 2.0.1

$ react-native init RNApp
<...>

$ cd RNApp
$ cat .flowconfig
<...>
[version]
^0.42.0

$yarn add [email protected]
$ yarn flow
<...>
Found 18 errors

$react-native -V
0.44.2

@Hypnosphi
Copy link

I suppose that template should be kept in sync with actual flowconfig. Alternatively, RN community could maintain libdefs on flow-typed repo, and the generator could install a libdef, based on RN and flow versions.

@raul782
Copy link

raul782 commented Jun 17, 2017

Is this solved? I tried the solutions mentioned above, but I still have 145 errors, related to react_native/Libraries files
This is the version I'm using

$react-native -v
react-native-cli: 2.0.1
react-native: 0.36.1
$flow version
Flow, a static type checker for JavaScript, version 0.47.0

@hramos
Copy link
Contributor

hramos commented Aug 24, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Aug 24, 2017
@hramos hramos closed this as completed Aug 24, 2017
@ck3mp3r
Copy link

ck3mp3r commented Nov 29, 2017

Still having this issue after creating new project with react-nativi init helloworld

$ flow version
Flow, a static type checker for JavaScript, version 0.59.0
$ react-native --version      
react-native-cli: 2.0.1
react-native: 0.50.4

Updated the .flowconfig to use the correct flow version I have installed.

Running flow results in 22 errors:

Error: node_modules/metro-bundler/src/JSTransformer/index.js.flow:204                                                                                                                                       
204:   static TransformError;                                                                                                                                                                               
       ^^^^^^^^^^^^^^^^^^^^^^ property `TransformError`. Missing annotation                                                                                                                                 
                                                                                                                                                                                                            
Error: node_modules/metro-bundler/src/Server/index.js.flow:1323                                                                                                                                             
1323:   static DEFAULT_BUNDLE_OPTIONS;                                                                                                                                                                      
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ property `DEFAULT_BUNDLE_OPTIONS`. Missing annotation                                                                                                                
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:65                                                                                                                                        
 65:   static step0(n) {                                                                                                                                                                                    
                    ^ parameter `n`. Missing annotation                                                                                                                                                     
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:72                                                                                                                                        
 72:   static step1(n) {                                                                                                                                                                                    
                    ^ parameter `n`. Missing annotation                                                                                                                                                     
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:82                                                                                                                                        
 82:   static linear(t) {                                                                                                                                                                                   
                     ^ parameter `t`. Missing annotation                                                                                                                                                    
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:105                                                                                                                                       
105:   static quad(t) {                                                                                                                                                                                     
                   ^ parameter `t`. Missing annotation                                                                                                                                                      
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:115                                                                                                                                       
115:   static cubic(t) {                                                                                                                                                                                    
                    ^ parameter `t`. Missing annotation                                                                                                                                                     
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:125                                                                                                                                       
125:   static poly(n) {                                                                                                                                                                                     
                   ^ parameter `n`. Missing annotation                                                                                                                                                      
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:126                                                                                                                                       
126:     return (t) => Math.pow(t, n);                                                                                                                                                                      
                 ^ parameter `t`. Missing annotation                                                                                                                                                        
                                                                                                                                                                                                            
Error: node_modules/react-native/Libraries/Animated/src/Easing.js:134                                                                                                                                       
134:   static sin(t) {                                                                                                                                                                                      
                  ^ parameter `t`. Missing annotation                                                                                                                                                       

Error: node_modules/react-native/Libraries/Animated/src/Easing.js:143
143:   static circle(t) {
                     ^ parameter `t`. Missing annotation

Error: node_modules/react-native/Libraries/Animated/src/Easing.js:152
152:   static exp(t) {
                  ^ parameter `t`. Missing annotation

Error: node_modules/react-native/Libraries/CameraRoll/CameraRoll.js:258
258:   static getPhotos(params) {
                        ^^^^^^ parameter `params`. Missing annotation
Error: node_modules/react-native/Libraries/Experimental/WindowedListView.js:179
179:     renderScrollComponent: (props) => <ScrollView {...props} />,
                                 ^^^^^ parameter `props`. Missing annotation

Error: node_modules/react-native/Libraries/Lists/ListView/__mocks__/ListViewMock.js:22
 22:     renderScrollComponent: props => <ScrollView {...props} />,
                                ^^^^^ parameter `props`. Missing annotation

Error: node_modules/react-native/Libraries/Share/Share.js:108
108:   static get sharedAction() { return 'sharedAction'; }
                                ^ return. Missing annotation

Error: node_modules/react-native/Libraries/Share/Share.js:114
114:   static get dismissedAction() { return 'dismissedAction'; }
                                   ^ return. Missing annotation

Error: node_modules/react-native/Libraries/StyleSheet/StyleSheetValidation.js:27
 27:   static validateStyleProp(prop, style, caller) {
                                ^^^^ parameter `prop`. Missing annotation

Error: node_modules/react-native/Libraries/StyleSheet/StyleSheetValidation.js:27
 27:   static validateStyleProp(prop, style, caller) {
                                      ^^^^^ parameter `style`. Missing annotation

Error: node_modules/react-native/Libraries/StyleSheet/StyleSheetValidation.js:27
 27:   static validateStyleProp(prop, style, caller) {
                                             ^^^^^^ parameter `caller`. Missing annotation

Error: node_modules/react-native/Libraries/StyleSheet/StyleSheetValidation.js:62
 62:   static validateStyle(name, styles) {
                            ^^^^ parameter `name`. Missing annotation

Error: node_modules/react-native/Libraries/StyleSheet/StyleSheetValidation.js:62
 62:   static validateStyle(name, styles) {
                                  ^^^^^^ parameter `styles`. Missing annotation


Found 22 errors

facebook-github-bot pushed a commit that referenced this issue Dec 7, 2017
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

There are some errors I noticed after upgrading my flow version.  I had them in my project, and they were also reported in #11655.  These errors were ignored on master, but I went through and fixed them so the static analysis will work still.

After these changes, I receive no errors using flow `0.60.1` on latest master, or using `0.59` in my local project (which does not have the requisite ignores included).

- init a new project
     `react-native init --version <path-to-repo> helloworld`
- add the flow binary
     `yarn add -D flow-bin`
- run flow
     `yarn flow`
- make sure there are no errors in the project.
     ```
     No errors!
     ✨  Done in 23.60s.
     ```

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[GENERAL][BUGFIX][./Libraries] - Fix up some flow definitions
Closes #17086

Differential Revision: D6509112

Pulled By: hramos

fbshipit-source-id: a61145b5306c666ab6510ccb9eea02d96f3decb3
@facebook facebook locked as resolved and limited conversation to collaborators Aug 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests