Issue in linking package in RN >= 0.60

System info

System:
    OS: macOS High Sierra 10.13.6
    CPU: (4) x64 Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz
    Memory: 592.89 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.10.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.3 => 0.60.3 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7

The package is not properly working with react-native version >=0.60.
I have followed each steps to install but it is not working after linking the package.
When I ran react-native link react-native-gesture-handler, it produces error link below;
image

If i try to link the package manually, I get error like,

fatal error: 'React/RCTEventDispatcher.h' file not found
#import <React/RCTEventDispatcher.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

I guess this issue is with RN 0.60.3, because I have tried it RN0.60.0 and it was working fine with v0.60.0.

My Package.json looks like below;

{
  "name": "animations",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "postinstall": "jetify"
  },
  "dependencies": {
    "react": "16.8.6",
    "react-native": "0.60.3",
    "react-native-gesture-handler": "^1.3.0",
    "react-navigation": "^3.11.0"
  },
  "devDependencies": {
    "@babel/core": "^7.5.4",
    "@babel/runtime": "^7.5.4",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.8.0",
    "eslint": "^6.0.1",
    "jest": "^24.8.0",
    "jetifier": "^1.6.2",
    "metro-react-native-babel-preset": "^0.55.0",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

2 thoughts on “Issue in linking package in RN >= 0.60

  1. react-native-gesture-handler is compatible with autolinking. What you need to do:

    cc @osdnk feel free to close this.