Error “global is not defined” after configuring react-native-gifted-chat for Expo 50

  Kiến thức lập trình

I have an issue with the react-native-gifted-chat library.

I just added it to my Expo project (version 50) by following the procedure found on the GitHub page (https://github.com/FaridSafi/react-native-gifted-chat?tab=readme-ov-file) and I get an error message global is not defined whenever I open the page containing the component.

  1. I installed the 4 necessary libraries via Expo (react-native-gifted-chat react-native-reanimated react-native-safe-area-context react-native-get-random-values)
  2. I configured the react-native-safe-area-context by wrapping my components with <SafeAreaProvider />
  3. I configured react-native-reanimated by adding the react-native-reanimated/plugin as the last listed item, cleared the metro bundler cache, installed the @babel/plugin-proposal-export-namespace-from and listed it before the react-native-reanimated/plugin.

I am confused as to what I am missing, can anyone help?

Thanks,
Jacob

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT