react-native: Newly initialized react native project has flow errors

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 > node-uuid@1.4.7: 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.
   β”œβ”€ absolute-path@0.0.0
   β”œβ”€ accepts@1.2.13
   β”‚  β”œβ”€ mime-db@1.25.0
   β”‚  └─ mime-types@2.1.13
   β”œβ”€ align-text@0.1.4
   β”œβ”€ ansi-escapes@1.4.0
   β”œβ”€ ansi-regex@2.0.0
   β”œβ”€ ansi-styles@2.2.1
   β”œβ”€ ansi@0.3.1
   β”œβ”€ are-we-there-yet@1.1.2
   β”œβ”€ array-differ@1.0.0
   β”œβ”€ array-filter@0.0.1
   β”œβ”€ array-find-index@1.0.2
   β”œβ”€ array-map@0.0.0
   β”œβ”€ array-reduce@0.0.0
   β”œβ”€ array-union@1.0.2
   β”œβ”€ array-uniq@1.0.3
   β”œβ”€ arrify@1.0.1
   β”œβ”€ art@0.10.1
   β”œβ”€ asap@2.0.5
   β”œβ”€ async@2.1.4
   β”œβ”€ babel-code-frame@6.20.0
   β”œβ”€ babel-core@6.21.0
   β”‚  └─ json5@0.5.1
   β”œβ”€ babel-generator@6.21.0
   β”œβ”€ babel-helper-builder-react-jsx@6.21.1
   β”œβ”€ babel-helper-call-delegate@6.18.0
   β”œβ”€ babel-helper-define-map@6.18.0
   β”œβ”€ babel-helper-function-name@6.18.0
   β”œβ”€ babel-helper-get-function-arity@6.18.0
   β”œβ”€ babel-helper-hoist-variables@6.18.0
   β”œβ”€ babel-helper-optimise-call-expression@6.18.0
   β”œβ”€ babel-helper-regex@6.18.0
   β”œβ”€ babel-helper-replace-supers@6.18.0
   β”œβ”€ babel-helpers@6.16.0
   β”œβ”€ babel-messages@6.8.0
   β”œβ”€ babel-plugin-check-es2015-constants@6.8.0
   β”œβ”€ babel-plugin-external-helpers@6.18.0
   β”œβ”€ babel-plugin-react-transform@2.0.2
   β”œβ”€ babel-plugin-syntax-async-functions@6.13.0
   β”œβ”€ babel-plugin-syntax-class-properties@6.13.0
   β”œβ”€ babel-plugin-syntax-flow@6.18.0
   β”œβ”€ babel-plugin-syntax-jsx@6.18.0
   β”œβ”€ babel-plugin-syntax-object-rest-spread@6.13.0
   β”œβ”€ babel-plugin-syntax-trailing-function-commas@6.20.0
   β”œβ”€ babel-plugin-transform-class-properties@6.19.0
   β”œβ”€ babel-plugin-transform-es2015-arrow-functions@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-block-scoped-functions@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-block-scoping@6.21.0
   β”œβ”€ babel-plugin-transform-es2015-classes@6.18.0
   β”œβ”€ babel-plugin-transform-es2015-computed-properties@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-destructuring@6.19.0
   β”œβ”€ babel-plugin-transform-es2015-for-of@6.18.0
   β”œβ”€ babel-plugin-transform-es2015-function-name@6.9.0
   β”œβ”€ babel-plugin-transform-es2015-literals@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-modules-commonjs@6.18.0
   β”œβ”€ babel-plugin-transform-es2015-object-super@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-parameters@6.21.0
   β”œβ”€ babel-plugin-transform-es2015-shorthand-properties@6.18.0
   β”œβ”€ babel-plugin-transform-es2015-spread@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-sticky-regex@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-template-literals@6.8.0
   β”œβ”€ babel-plugin-transform-es2015-unicode-regex@6.11.0
   β”œβ”€ babel-plugin-transform-es3-member-expression-literals@6.8.0
   β”œβ”€ babel-plugin-transform-es3-property-literals@6.8.0
   β”œβ”€ babel-plugin-transform-flow-strip-types@6.21.0
   β”œβ”€ babel-plugin-transform-object-assign@6.8.0
   β”œβ”€ babel-plugin-transform-object-rest-spread@6.20.2
   β”œβ”€ babel-plugin-transform-react-display-name@6.8.0
   β”œβ”€ babel-plugin-transform-react-jsx-source@6.9.0
   β”œβ”€ babel-plugin-transform-react-jsx@6.8.0
   β”œβ”€ babel-plugin-transform-regenerator@6.21.0
   β”œβ”€ babel-plugin-transform-strict-mode@6.18.0
   β”œβ”€ babel-polyfill@6.20.0
   β”‚  └─ regenerator-runtime@0.10.1
   β”œβ”€ babel-preset-es2015-node@6.1.1
   β”œβ”€ babel-preset-fbjs@2.1.0
   β”œβ”€ babel-preset-react-native@1.9.1
   β”œβ”€ babel-register@6.18.0
   β”œβ”€ babel-runtime@6.20.0
   β”‚  └─ regenerator-runtime@0.10.1
   β”œβ”€ babel-template@6.16.0
   β”œβ”€ babel-traverse@6.21.0
   β”œβ”€ babel-types@6.21.0
   β”œβ”€ babylon@6.14.1
   β”œβ”€ balanced-match@0.4.2
   β”œβ”€ base64-js@1.2.0
   β”œβ”€ base64-url@1.2.1
   β”œβ”€ basic-auth-connect@1.0.0
   β”œβ”€ basic-auth@1.0.4
   β”œβ”€ batch@0.5.3
   β”œβ”€ beeper@1.1.1
   β”œβ”€ body-parser@1.13.3
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  β”œβ”€ iconv-lite@0.4.11
   β”‚  └─ ms@0.7.1
   β”œβ”€ bplist-creator@0.0.4
   β”œβ”€ bplist-parser@0.0.6
   β”œβ”€ brace-expansion@1.1.6
   β”œβ”€ bser@1.0.2
   β”œβ”€ buffer-shims@1.0.0
   β”œβ”€ builtin-modules@1.1.1
   β”œβ”€ bytes@2.1.0
   β”œβ”€ camelcase-keys@2.1.0
   β”‚  └─ camelcase@2.1.1
   β”œβ”€ camelcase@3.0.0
   β”œβ”€ center-align@0.1.3
   β”œβ”€ chalk@1.1.3
   β”œβ”€ cli-cursor@1.0.2
   β”œβ”€ cli-width@2.1.0
   β”œβ”€ cliui@3.2.0
   β”œβ”€ clone-stats@0.0.1
   β”œβ”€ clone@1.0.2
   β”œβ”€ code-point-at@1.1.0
   β”œβ”€ commander@2.9.0
   β”œβ”€ compressible@2.0.9
   β”‚  └─ mime-db@1.25.0
   β”œβ”€ compression@1.5.2
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  └─ ms@0.7.1
   β”œβ”€ concat-map@0.0.1
   β”œβ”€ connect-timeout@1.6.2
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  └─ ms@0.7.1
   β”œβ”€ connect@2.30.2
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  └─ ms@0.7.1
   β”œβ”€ content-type@1.0.2
   β”œβ”€ convert-source-map@1.3.0
   β”œβ”€ cookie-parser@1.3.5
   β”œβ”€ cookie-signature@1.0.6
   β”œβ”€ cookie@0.1.3
   β”œβ”€ core-js@2.4.1
   β”œβ”€ core-util-is@1.0.2
   β”œβ”€ crc@3.3.0
   β”œβ”€ cross-spawn@3.0.1
   β”œβ”€ csrf@3.0.4
   β”‚  β”œβ”€ base64-url@1.3.3
   β”‚  └─ uid-safe@2.1.3
   β”œβ”€ csurf@1.8.3
   β”œβ”€ currently-unhandled@0.4.1
   β”œβ”€ dateformat@1.0.12
   β”œβ”€ debug@2.4.5
   β”œβ”€ decamelize@1.2.0
   β”œβ”€ delegates@1.0.0
   β”œβ”€ denodeify@1.2.1
   β”œβ”€ depd@1.0.1
   β”œβ”€ destroy@1.0.4
   β”œβ”€ detect-indent@4.0.0
   β”œβ”€ dom-walk@0.1.1
   β”œβ”€ duplexer2@0.0.2
   β”‚  β”œβ”€ isarray@0.0.1
   β”‚  └─ readable-stream@1.1.14
   β”œβ”€ ee-first@1.1.1
   β”œβ”€ encoding@0.1.12
   β”œβ”€ errno@0.1.4
   β”œβ”€ error-ex@1.3.0
   β”œβ”€ errorhandler@1.4.3
   β”‚  β”œβ”€ accepts@1.3.3
   β”‚  β”œβ”€ mime-db@1.25.0
   β”‚  β”œβ”€ mime-types@2.1.13
   β”‚  └─ negotiator@0.6.1
   β”œβ”€ escape-html@1.0.3
   β”œβ”€ escape-string-regexp@1.0.5
   β”œβ”€ esutils@2.0.2
   β”œβ”€ etag@1.7.0
   β”œβ”€ event-target-shim@1.1.1
   β”œβ”€ exec-sh@0.2.0
   β”œβ”€ exit-hook@1.1.1
   β”œβ”€ express-session@1.11.3
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  └─ ms@0.7.1
   β”œβ”€ fancy-log@1.2.0
   β”œβ”€ fb-watchman@1.9.0
   β”œβ”€ fbjs-scripts@0.7.1
   β”‚  β”œβ”€ babel-preset-fbjs@1.0.0
   β”‚  └─ core-js@1.2.7
   β”œβ”€ fbjs@0.8.7
   β”‚  └─ core-js@1.2.7
   β”œβ”€ figures@1.7.0
   β”œβ”€ finalhandler@0.4.0
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  β”œβ”€ escape-html@1.0.2
   β”‚  └─ ms@0.7.1
   β”œβ”€ find-up@1.1.2
   β”œβ”€ fresh@0.3.0
   β”œβ”€ fs-extra@0.26.7
   β”œβ”€ fs.realpath@1.0.0
   β”œβ”€ gauge@1.2.7
   β”œβ”€ get-caller-file@1.0.2
   β”œβ”€ get-stdin@4.0.1
   β”œβ”€ glob@5.0.15
   β”œβ”€ global@4.3.1
   β”œβ”€ globals@9.14.0
   β”œβ”€ glogg@1.0.0
   β”œβ”€ graceful-fs@4.1.11
   β”œβ”€ graceful-readlink@1.0.1
   β”œβ”€ gulp-util@3.0.7
   β”‚  └─ object-assign@3.0.0
   β”œβ”€ gulplog@1.0.0
   β”œβ”€ has-ansi@2.0.0
   β”œβ”€ has-gulplog@0.1.0
   β”œβ”€ has-unicode@2.0.1
   β”œβ”€ hoek@2.16.3
   β”œβ”€ home-or-tmp@2.0.0
   β”œβ”€ hosted-git-info@2.1.5
   β”œβ”€ http-errors@1.3.1
   β”œβ”€ iconv-lite@0.4.15
   β”œβ”€ image-size@0.3.5
   β”œβ”€ immutable@3.7.6
   β”œβ”€ imurmurhash@0.1.4
   β”œβ”€ indent-string@2.1.0
   β”œβ”€ inflight@1.0.6
   β”œβ”€ inherits@2.0.3
   β”œβ”€ inquirer@0.12.0
   β”œβ”€ invariant@2.2.2
   β”œβ”€ invert-kv@1.0.0
   β”œβ”€ is-arrayish@0.2.1
   β”œβ”€ is-buffer@1.1.4
   β”œβ”€ is-builtin-module@1.0.0
   β”œβ”€ is-finite@1.0.2
   β”œβ”€ is-fullwidth-code-point@1.0.0
   β”œβ”€ is-stream@1.1.0
   β”œβ”€ is-utf8@0.2.1
   β”œβ”€ isarray@1.0.0
   β”œβ”€ isemail@1.2.0
   β”œβ”€ isexe@1.1.2
   β”œβ”€ isomorphic-fetch@2.2.1
   β”‚  └─ whatwg-fetch@2.0.1
   β”œβ”€ jest-haste-map@17.0.3
   β”œβ”€ joi@6.10.1
   β”œβ”€ js-tokens@2.0.0
   β”œβ”€ jsesc@1.3.0
   β”œβ”€ json-stable-stringify@1.0.1
   β”œβ”€ json5@0.4.0
   β”œβ”€ jsonfile@2.4.0
   β”œβ”€ jsonify@0.0.0
   β”œβ”€ kind-of@3.1.0
   β”œβ”€ klaw@1.3.1
   β”œβ”€ lazy-cache@1.0.4
   β”œβ”€ lcid@1.0.0
   β”œβ”€ load-json-file@1.1.0
   β”œβ”€ lodash._basecopy@3.0.1
   β”œβ”€ lodash._basetostring@3.0.1
   β”œβ”€ lodash._basevalues@3.0.0
   β”œβ”€ lodash._getnative@3.9.1
   β”œβ”€ lodash._isiterateecall@3.0.9
   β”œβ”€ lodash._reescape@3.0.0
   β”œβ”€ lodash._reevaluate@3.0.0
   β”œβ”€ lodash._reinterpolate@3.0.0
   β”œβ”€ lodash._root@3.0.1
   β”œβ”€ lodash.escape@3.2.0
   β”œβ”€ lodash.isarguments@3.1.0
   β”œβ”€ lodash.isarray@3.0.4
   β”œβ”€ lodash.keys@3.1.2
   β”œβ”€ lodash.pad@4.5.1
   β”œβ”€ lodash.padend@4.6.1
   β”œβ”€ lodash.padstart@4.6.1
   β”œβ”€ lodash.restparam@3.6.1
   β”œβ”€ lodash.template@3.6.2
   β”œβ”€ lodash.templatesettings@3.1.1
   β”œβ”€ lodash@4.17.2
   β”œβ”€ longest@1.0.1
   β”œβ”€ loose-envify@1.3.0
   β”œβ”€ loud-rejection@1.6.0
   β”œβ”€ lru-cache@4.0.2
   β”œβ”€ makeerror@1.0.11
   β”œβ”€ map-obj@1.0.1
   β”œβ”€ media-typer@0.3.0
   β”œβ”€ meow@3.7.0
   β”œβ”€ merge@1.2.0
   β”œβ”€ method-override@2.3.7
   β”‚  β”œβ”€ debug@2.3.3
   β”‚  └─ vary@1.1.0
   β”œβ”€ methods@1.1.2
   β”œβ”€ mime-db@1.23.0
   β”œβ”€ mime-types@2.1.11
   β”œβ”€ mime@1.3.4
   β”œβ”€ min-document@2.19.0
   β”œβ”€ minimatch@3.0.3
   β”œβ”€ minimist@1.2.0
   β”œβ”€ mkdirp@0.5.1
   β”‚  └─ minimist@0.0.8
   β”œβ”€ moment@2.17.1
   β”œβ”€ morgan@1.6.1
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  └─ ms@0.7.1
   β”œβ”€ ms@0.7.2
   β”œβ”€ multimatch@2.1.0
   β”œβ”€ multiparty@3.3.2
   β”‚  β”œβ”€ isarray@0.0.1
   β”‚  └─ readable-stream@1.1.14
   β”œβ”€ multipipe@0.1.2
   β”œβ”€ mute-stream@0.0.5
   β”œβ”€ negotiator@0.5.3
   β”œβ”€ node-fetch@1.6.3
   β”œβ”€ node-int64@0.4.0
   β”œβ”€ node-uuid@1.4.7
   β”œβ”€ normalize-package-data@2.3.5
   β”œβ”€ npmlog@2.0.4
   β”œβ”€ number-is-nan@1.0.1
   β”œβ”€ object-assign@4.1.0
   β”œβ”€ on-finished@2.3.0
   β”œβ”€ on-headers@1.0.1
   β”œβ”€ once@1.4.0
   β”œβ”€ onetime@1.1.0
   β”œβ”€ opn@3.0.3
   β”œβ”€ optimist@0.6.1
   β”‚  β”œβ”€ minimist@0.0.10
   β”‚  └─ wordwrap@0.0.3
   β”œβ”€ options@0.0.6
   β”œβ”€ os-homedir@1.0.2
   β”œβ”€ os-locale@1.4.0
   β”œβ”€ os-tmpdir@1.0.2
   β”œβ”€ parse-json@2.2.0
   β”œβ”€ parseurl@1.3.1
   β”œβ”€ path-exists@2.1.0
   β”œβ”€ path-is-absolute@1.0.1
   β”œβ”€ path-type@1.1.0
   β”œβ”€ pause@0.1.0
   β”œβ”€ pegjs@0.9.0
   β”œβ”€ pify@2.3.0
   β”œβ”€ pinkie-promise@2.0.1
   β”œβ”€ pinkie@2.0.4
   β”œβ”€ plist@1.2.0
   β”‚  └─ base64-js@0.0.8
   β”œβ”€ private@0.1.6
   β”œβ”€ process-nextick-args@1.0.7
   β”œβ”€ process@0.5.2
   β”œβ”€ progress@1.1.8
   β”œβ”€ promise@7.1.1
   β”œβ”€ prr@0.0.0
   β”œβ”€ pseudomap@1.0.2
   β”œβ”€ qs@4.0.0
   β”œβ”€ random-bytes@1.0.0
   β”œβ”€ range-parser@1.0.3
   β”œβ”€ raw-body@2.1.7
   β”‚  β”œβ”€ bytes@2.4.0
   β”‚  └─ iconv-lite@0.4.13
   β”œβ”€ react-clone-referenced-element@1.0.1
   β”œβ”€ react-deep-force-update@1.0.1
   β”œβ”€ react-native@0.39.2
   β”œβ”€ react-proxy@1.1.8
   β”œβ”€ react-timer-mixin@0.13.3
   β”œβ”€ react-transform-hmr@1.0.4
   β”œβ”€ read-pkg-up@1.0.1
   β”œβ”€ read-pkg@1.1.0
   β”œβ”€ readable-stream@2.2.2
   β”œβ”€ readline2@1.0.1
   β”œβ”€ rebound@0.0.13
   β”œβ”€ redent@1.0.0
   β”œβ”€ regenerate@1.3.2
   β”œβ”€ regenerator-runtime@0.9.6
   β”œβ”€ regenerator-transform@0.9.8
   β”œβ”€ regexpu-core@2.0.0
   β”œβ”€ regjsgen@0.2.0
   β”œβ”€ regjsparser@0.1.5
   β”‚  └─ jsesc@0.5.0
   β”œβ”€ repeat-string@1.6.1
   β”œβ”€ repeating@2.0.1
   β”œβ”€ replace-ext@0.0.1
   β”œβ”€ require-directory@2.1.1
   β”œβ”€ require-main-filename@1.0.1
   β”œβ”€ response-time@2.3.2
   β”‚  └─ depd@1.1.0
   β”œβ”€ restore-cursor@1.0.1
   β”œβ”€ right-align@0.1.3
   β”œβ”€ rimraf@2.5.4
   β”‚  └─ glob@7.1.1
   β”œβ”€ rndm@1.2.0
   β”œβ”€ run-async@0.1.0
   β”œβ”€ rx-lite@3.1.2
   β”œβ”€ sane@1.4.1
   β”œβ”€ sax@1.1.6
   β”œβ”€ semver@5.3.0
   β”œβ”€ send@0.13.2
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  β”œβ”€ depd@1.1.0
   β”‚  β”œβ”€ ms@0.7.1
   β”‚  └─ statuses@1.2.1
   β”œβ”€ serve-favicon@2.3.2
   β”œβ”€ serve-index@1.7.3
   β”‚  β”œβ”€ debug@2.2.0
   β”‚  β”œβ”€ mime-db@1.25.0
   β”‚  β”œβ”€ mime-types@2.1.13
   β”‚  └─ ms@0.7.1
   β”œβ”€ serve-static@1.10.3
   β”œβ”€ set-blocking@2.0.0
   β”œβ”€ setimmediate@1.0.5
   β”œβ”€ shell-quote@1.6.1
   β”œβ”€ signal-exit@3.0.2
   β”œβ”€ simple-plist@0.1.4
   β”œβ”€ slash@1.0.0
   β”œβ”€ slide@1.1.6
   β”œβ”€ source-map-support@0.4.6
   β”œβ”€ source-map@0.5.6
   β”œβ”€ sparkles@1.0.0
   β”œβ”€ spdx-correct@1.0.2
   β”œβ”€ spdx-expression-parse@1.0.4
   β”œβ”€ spdx-license-ids@1.2.2
   β”œβ”€ stacktrace-parser@0.1.4
   β”œβ”€ statuses@1.3.1
   β”œβ”€ stream-buffers@0.2.6
   β”œβ”€ stream-counter@0.2.0
   β”‚  β”œβ”€ isarray@0.0.1
   β”‚  └─ readable-stream@1.1.14
   β”œβ”€ string_decoder@0.10.31
   β”œβ”€ string-width@1.0.2
   β”œβ”€ strip-ansi@3.0.1
   β”œβ”€ strip-bom@2.0.0
   β”œβ”€ strip-indent@1.0.1
   β”œβ”€ supports-color@2.0.0
   β”œβ”€ temp@0.8.3
   β”‚  └─ rimraf@2.2.8
   β”œβ”€ throat@3.0.0
   β”œβ”€ through@2.3.8
   β”œβ”€ through2@2.0.3
   β”œβ”€ time-stamp@1.0.1
   β”œβ”€ tmpl@1.0.4
   β”œβ”€ to-fast-properties@1.0.2
   β”œβ”€ topo@1.1.0
   β”œβ”€ trim-newlines@1.0.0
   β”œβ”€ tsscmp@1.0.5
   β”œβ”€ type-is@1.6.14
   β”‚  β”œβ”€ mime-db@1.25.0
   β”‚  └─ mime-types@2.1.13
   β”œβ”€ ua-parser-js@0.7.12
   β”œβ”€ uglify-js@2.7.5
   β”‚  β”œβ”€ async@0.2.10
   β”‚  β”œβ”€ camelcase@1.2.1
   β”‚  β”œβ”€ cliui@2.1.0
   β”‚  β”œβ”€ window-size@0.1.0
   β”‚  β”œβ”€ wordwrap@0.0.2
   β”‚  └─ yargs@3.10.0
   β”œβ”€ uglify-to-browserify@1.0.2
   β”œβ”€ uid-safe@2.0.0
   β”œβ”€ ultron@1.0.2
   β”œβ”€ unpipe@1.0.0
   β”œβ”€ util-deprecate@1.0.2
   β”œβ”€ utils-merge@1.0.0
   β”œβ”€ validate-npm-package-license@3.0.1
   β”œβ”€ vary@1.0.1
   β”œβ”€ vhost@3.0.2
   β”œβ”€ vinyl@0.5.3
   β”œβ”€ walker@1.0.7
   β”œβ”€ watch@0.10.0
   β”œβ”€ whatwg-fetch@1.1.1
   β”œβ”€ which-module@1.0.0
   β”œβ”€ which@1.2.12
   β”œβ”€ window-size@0.2.0
   β”œβ”€ wordwrap@1.0.0
   β”œβ”€ worker-farm@1.3.1
   β”œβ”€ wrap-ansi@2.1.0
   β”œβ”€ wrappy@1.0.2
   β”œβ”€ write-file-atomic@1.2.0
   β”œβ”€ ws@1.1.1
   β”œβ”€ xcode@0.8.9
   β”œβ”€ xmlbuilder@4.0.0
   β”‚  └─ lodash@3.10.1
   β”œβ”€ xmldoc@0.4.0
   β”œβ”€ xmldom@0.1.27
   β”œβ”€ xtend@4.0.1
   β”œβ”€ y18n@3.2.1
   β”œβ”€ yallist@2.0.0
   β”œβ”€ yargs-parser@4.2.0
   └─ yargs@6.5.0
   ✨  Done in 7.54s.
   Setting up new React Native app in /Users/drew.wyatt/Projects/Whatever
   Installing React...
   Installing Jest...
   npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
   npm WARN prefer global marked@0.3.6 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

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 10
  • Comments: 26 (5 by maintainers)

Commits related to this issue

Most upvoted comments

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.

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

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).

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

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.

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

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.