TypeError: undefined is not an object (evaluating '_this.setComponentRef.bind')

I’m trying to run recently detached app by a coworker in my mac.

I get the title error each time I try to run it either on android or ios.

He can run the app successfully in his mac/computer though.

Here’s my babel.config.js

module.exports = {
  presets: ["babel-preset-expo"],
  plugins: [
    ["@babel/plugin-transform-flow-strip-types"],
    [
      "@babel/plugin-proposal-class-properties",
      {
        loose: true
      }
    ]
  ]
};

I’m also using typescript:

tsconfig.json

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": true,
    "importHelpers": true,
    "jsx": "react-native",
    "lib": ["dom", "es2015", "es2016", "es2017"],
    "module": "es2015",
    "moduleResolution": "node",
    "noEmitHelpers": true,
    "noImplicitReturns": true,
    "noImplicitAny": false,
    "noUnusedLocals": true,
    "skipLibCheck": true, // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24573
    "sourceMap": false,
    "strict": true,
    "target": "es2017"
  },
  "exclude": ["node_modules"],
  "types": ["typePatches"]
}

I’m not sure how to reproduce this bug but if anyone has an idea of what it might be it would help a lot.

Thanks

so after wasting a whole day trying to debug this. I went and did shift+r in the inside the terminal that’s running the metro builder expo start and that seems to did the trick?

image

Interesting. The cache strikes again. Thanks for sharing the potential solution with the community!

Cheers,

Adam

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.