React-native-gifted-chat: Cannot read property cache of undefined (0.10.1)

Created on 27 Sep 2019  路  6Comments  路  Source: FaridSafi/react-native-gifted-chat

Cant run the app due to error with that module from the project, react-native-parsed-text.

Installing the app in React Native .60.

Simulator Screen Shot - iPhone 8 - 2019-09-27 at 12 20 18

Most helpful comment

I fixed it by commenting out api.cache(true); present in
node_modules/react-native-gifted-chat/react-native-parsed-text/babel.config.js
i.e

module.exports = function(api) {
  // api.cache(true);
  return {
    presets: ['babel-preset-expo'],
  };
};

All 6 comments

Also getting this error

@R8Manzo did you find a fix yet ?

@acidhax did you find a fix for this yet ?

I fixed it by commenting out api.cache(true); present in
node_modules/react-native-gifted-chat/react-native-parsed-text/babel.config.js
i.e

module.exports = function(api) {
  // api.cache(true);
  return {
    presets: ['babel-preset-expo'],
  };
};

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I fixed it by commenting out api.cache(true); present in
node_modules/react-native-gifted-chat/react-native-parsed-text/babel.config.js

in my case those steps are taken:

  • go to node_modules/react-native-parsed-text/babel.config.js
  • coommetnt second line // api.cache(true);
  • close Metro Bundler
  • run yarn run ios, you may need to run it twice // "ios": "react-native run-ios"
Was this page helpful?
0 / 5 - 0 ratings

Related issues

xcxooxl picture xcxooxl  路  3Comments

cerberusv2px picture cerberusv2px  路  3Comments

luisar picture luisar  路  3Comments

radvc picture radvc  路  3Comments

Hayko1994 picture Hayko1994  路  3Comments