question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue in linking package in RN >= 0.60

See original GitHub issue

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"
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
thymikeecommented, Jul 17, 2019

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

cc @osdnk feel free to close this.

2reactions
thymikeecommented, Jul 17, 2019

@ravimaurya-nickelfox @kimihiro64 you don’t need to add react-native.config.js. It was mentioned by react-navigation but is obsolete now. What you need to do is to run cd ios && pod install before running iOS app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not compatible with RN 0.60 autolinking - react native
To get rid of them you have to use react-native unlink on all your linked packages, that are listed in the error.
Read more >
Upgrade to React Native 0.60 - Matt Oakes
The big new feature of React Native 0.60 is Autolinking. ... It's a multi-step process and missing one of the steps can lead...
Read more >
React Native SDK Troubleshooting - Visual Studio App Center
This error appears when RN core libraries aren't referenced correctly, which can be caused by different kinds of integrating or linking issues.
Read more >
Announcing React Native 0.60
After months of hard work from hundreds of contributors, the React Native Core team is proud to announce the release of version 0.60....
Read more >
Installation | React Native Navigation - Open Source
Installing with npx rnn-link #. If you're using RN 0.60 or higher, you can benefit from autolinking for some of the necessary installation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found