I upgraded an Expo project to SDK v33 this morning, following the instructions here. Now when I run my app I get a warning that the LinearGradient package is deprecated:
The following APIs have moved to separate packages and importing them from the "expo" package is deprecated: LinearGradient.
1. Add correct versions of these packages to your project using:
expo install expo-linear-gradient
If "install" is not recognized as an expo command, update your expo-cli installation.
2. Change your imports so they use specific packages instead of the "expo" package:
- import { LinearGradient } from 'expo' -> import { LinearGradient } from 'expo-linear-gradient'
After some hunting around through my codebase, I discovered that I don’t import LinearGradient anywhere. I believe the warning is due to my use of linearGradientProps on the Button component from react-native-elements. I upgraded react-native-elements to v1.1.0 too, for what it’s worth.
Per their website, LinearGradient is automatically included with Expo, so I’m not sure if I should post an issue on their repo or on Expo’s. I am looking for guidance on that point, please.
I did try following the console message’s instructions to run expo install expo-linear-gradient, but that made no difference.
The following APIs have moved to separate packages and importing them from the "expo" package is deprecated: Constants.
1. Add correct versions of these packages to your project using:
expo install expo-constants
If "install" is not recognized as an expo command, update your expo-cli installation.
2. Change your imports so they use specific packages instead of the "expo" package:
- import { Constants } from 'expo' -> import Constants from 'expo-constants'
Yes, I do import Constants but I was following migration guide and I’m sure I do it in the right way. In addition, even if I remove all imports to Constants, the problem doesn’t disappear. My console is completely full with these messages, I can’t see my debug messages.