react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Flow fails: cannot determine object type for ____ShadowStyle_Internal because ____ShadowStyle_InternalOverrides is inexact.

Open samwightt opened this issue 3 years ago • 0 comments

Description

Tried making a clean expo project and adding Flow to it. I ran yarn flow init, changed the config a little (adding an ignore), and then ran yarn flow status and got this error after editing the App.js file a bit:

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ App.js:15:20

Cannot create Text element because Flow cannot determine a type for object type [1].
____ShadowStyle_InternalOverrides [2] is inexact, so it may contain shadowRadius with a type that conflicts with
shadowRadius's definition in ____ShadowStyle_InternalCore [3]. Try making ____ShadowStyle_InternalOverrides [2] exact in
property style. [incompatible-type]

     App.js
      12│         backgroundColor: "blue",
      13│       }}
      14│     >
      15│       <Text style={{ color: "blue" }}>
      16│         Open up App.js to start working on your app!
      17│       </Text>
      18│       <StatusBar style="auto" />

     node_modules/react-native/Libraries/StyleSheet/StyleSheetTypes.js
 [1] 523│ export type ____ShadowStyle_Internal = $ReadOnly<{
 [3] 524│   ...____ShadowStyle_InternalCore,
 [2] 525│   ...____ShadowStyle_InternalOverrides,
     526│ }>;



Found 1 error

Only showing the most relevant union/intersection branches.
To see all branches, re-run Flow with --show-all-branches
error Command failed with exit code 2.

Version

0.69.6

Output of npx react-native info

info Fetching system and libraries information... System: OS: macOS 12.3 CPU: (8) arm64 Apple M1 Memory: 1.17 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.14.2 - /var/folders/f3/050r15k930g0q3srfnc60hdc0000gn/T/yarn--1667508888786-0.08925418126430507/node Yarn: 1.22.19 - /var/folders/f3/050r15k930g0q3srfnc60hdc0000gn/T/yarn--1667508888786-0.08925418126430507/yarn npm: 8.19.2 - ~/.asdf/plugins/nodejs/shims/npm Watchman: Not Found Managers: CocoaPods: Not Found SDKs: iOS SDK: Not Found Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: /undefined - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.6 => 0.69.6 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found ✨ Done in 0.71s.

Steps to reproduce

  1. Clone the repo below.
  2. Run yarn to install all dependencies.
  3. Run yarn flow status and see the error.

Snack, code example, screenshot, or link to a repository

https://github.com/samwightt/flow-issue-repro

samwightt avatar Nov 03 '22 20:11 samwightt