Hi there, I am getting this warning after upgrading to Expo 40:
Your project is accessing the following APIs from a deprecated global rather than a module import: Constants (expo-constants).
The global “__expo” and “Expo” objects will be removed in SDK 41. Learn more about how to fix this warning: fyi/deprecated-globals.md at main · expo/fyi · GitHub
I did a quick search and found many discussions about, but I can’t get rid of it. Is anyone willing to assist?
I have already tried to hide it and to update some libraries (such as react-native-paper) to no avail. I would rather fix it than hiding it.
Hey @dariocostanzo, does searching for __expo in your project and/or the node_modules folder yield any results? If not and you are still seeing this warning, try clearing your caches and see if that resolves it.
Many thanks @wodin and @adamjnav, I started by installing expo-constants as suggested here to no avail, than I solved it yesterday by upgrading react-native-paper to 4.5.0
Someone has suggested that also SafeAreaView is triggering the warning, and got rid of the message by importing it from ‘react-native-safe-area-context’ rather than ‘react-native’, I haven’t had this issue, so I can’t give more details.
I know this is too much to expect, but I would have loved to have the logs showing where the issue was, as I am not super experienced and took me 2 days to figure it out, which I can’t really afford as I have deadlines, but fortunately it is sorted now.