react-native: Running `flow` inside a brand new project fails

flowsad

Steps to reproduce:

  1. react-native init someproject && cd someproject
  2. flow init
  3. flow
  4. Cry because there are 438 errors.

I am on OS X 10.10.2, iojs 1.6.3, react-native 0.3.10, and flow 0.8.

Here is the JSON from the first few errors:

{
  "passed": false,
  "errors": [
    {
      "message": [
        {
          "descr": "NativeModules\nRequired module not found",
          "code": 0,
          "path": "/Users/jergason/code/flowbreaks/node_modules/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js",
          "line": 14,
          "endline": 14,
          "start": 29,
          "end": 52
        }
      ]
    },
    {
      "message": [
        {
          "descr": "invariant\nRequired module not found",
          "code": 0,
          "path": "/Users/jergason/code/flowbreaks/node_modules/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js",
          "line": 16,
          "endline": 16,
          "start": 17,
          "end": 36
        }
      ]
    },
    {
      "message": [
        {
          "descr": "NativeModules\nRequired module not found",
          "code": 0,
          "path": "/Users/jergason/code/flowbreaks/node_modules/react-native/Libraries/AdSupport/AdSupportIOS.js",
          "line": 14,
          "endline": 14,
          "start": 17,
          "end": 40
        }
      ]
    },
    {
      "message": [
        {
          "descr": "NativeModules\nRequired module not found",
          "code": 0,
          "path": "/Users/jergason/code/flowbreaks/node_modules/react-native/Libraries/Animation/AnimationExperimental.js",
          "line": 14,
          "endline": 14,
          "start": 27,
          "end": 50
        }
      ]
    },
    {
      "message": [
        {
          "descr": "AnimationUtils\nRequired module not found",
          "code": 0,
          "path": "/Users/jergason/code/flowbreaks/node_modules/react-native/Libraries/Animation/AnimationExperimental.js",
          "line": 15,
          "endline": 15,
          "start": 22,
          "end": 46
        }
      ]
    },
    {
      "message": [
        {
          "descr": "identifier __DEV__\nUnknown global name",
          "code": 0,
          "path": "/Users/jergason/code/flowbreaks/node_modules/react-native/Libraries/Animation/AnimationExperimental.js",
          "line": 75,
          "endline": 75,
          "start": 5,
          "end": 11
        }
      ]
    },
    {
      "message": [
        {
          "descr": "ReactPropTypes\nRequired module not found",
          "code": 0,
          "path": "/Users/jergason/code/flowbreaks/node_modules/react-native/Libraries/Animation/LayoutAnimation.js",
          "line": 14,
          "endline": 14,
          "start": 17,
          "end": 41
        }
      ]
    },
// etc
  ]
}

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 5
  • Comments: 41 (19 by maintainers)

Most upvoted comments

Also on a pretty new project over here, getting 19 errors from running ‘flow’. RN @ 0.29.0 flow-bin @ 0.28.0

Here’s the output