Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not an object evaluating _this._setComponentRef.bind #21430

Closed
Stormsher opened this issue Oct 1, 2018 · 6 comments
Closed

undefined is not an object evaluating _this._setComponentRef.bind #21430

Stormsher opened this issue Oct 1, 2018 · 6 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@Stormsher
Copy link

## Environment
 React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
      Memory: 752.25 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.6.0 - ~/.nvm/versions/node/v10.6.0/bin/node
      Yarn: 1.10.0 - ~/.yarn/bin/yarn
      npm: 6.1.0 - ~/.nvm/versions/node/v10.6.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 27.0.3, 28.0.1
        API Levels: 23, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: ^16.4.14 => 16.4.14 
      @types/react-native: ^0.57.0 => 0.57.0 
      react: 16.5.2 => 16.5.2 
      react-native: 0.57.1 => 0.57.1 
    npmGlobalPackages:
      create-react-native-app: 2.0.2
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native: 0.57.1

Hi, I still getting an old issue about undefined is not an object evaluating _this._setComponentRef.bind

I tried adding "@babel/plugin-transform-flow-strip-types": "^7.0.0" to package.json and set my babel.config.js to

module.exports = {
    'presets': [
        'module:metro-react-native-babel-preset',
        'module:react-native-dotenv',
    ],
    'sourceMaps': true,
    'plugins': [
        '@babel/transform-flow-strip-types',
        '@babel/proposal-class-properties',
        '@babel/proposal-object-rest-spread',
        '@babel/transform-runtime'
    ],
};

any other ideas? seems like this happing in TouchableOpacity onPress property...

@Abramovick
Copy link

Abramovick commented Nov 6, 2018

I also have the same problem. Any fix??

@tibbus
Copy link

tibbus commented Nov 8, 2018

I have the same issue on osX, nothing worked for me, tried the solutions from all the github issues for hours....
This is a weird babel cache issue, I don't have the cache in /tmp/... .

The only thing that worked for me now was to restart the pc....

@ger86
Copy link

ger86 commented Nov 8, 2018

I have the same problem and I have resolved it rebooting my computer and adding this babel plugin: @babel/plugin-transform-flow-strip-types

But I am sure that is a cache issue, because since RN 57.4 sometimes my iOS simulator cannot update changes done to the source code like if the metro can't detect those changes....

@brancooo1
Copy link

React Native sucks so much, it's unbelievable how much effort it takes to make things even work.

80% react native problems
20% you actually code your app

@ferrannp
Copy link
Contributor

Hello there 👋 this issue has been reported for an old version of React Native. Ideally we'd like everyone to be using 0.59 (see the awesome changes it brought) but we know updating can be a pain. We are going to close this issue because it's from a version before 0.57, which is really old.

But please, if it's actually still an issue with 0.59 please comment below and we can reopen it 😊

@caelmeCj
Copy link

caelmeCj commented Apr 4, 2019

The problem is, if we want to use realm, we have to use 0.57 for some compatibility reason

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants