-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moti requires expo-linear-gradient when im using react native cli only without expo @nandorojo #329
Comments
@husam868maher @nandorojo same here any fix for this ? |
Did you use the non-expo approach from the skeleton on docs? |
Hey @nandorojo! Recently I've also tried to use Skeleton component with react-native-cli & react-native-lineal-gradient but got the same error as @yamak-app |
Seems like your Babel plugin isn't working |
You added the module resolver one from the docs? |
Hi @nandorojo ! Thanks again for such great package for animations. I've resolved |
Can you please send the code inline? |
expo.tsx file:
skeleton.tsx:
The only important change here is this new import { LinearGradient } from 'react-native-linear-gradient' instead of expo-linear-gradient. babel.config.js:
|
I didn't properly tested it with other RN versions. In my case it's working like a charm for both Android/iOS "react-native": "0.72.7" |
@nandorojo Let me know if it's working on your side? By the way, maybe it's better to override this react-native-linear-gradient/expo-linear-gradient dependency directly in json with "overrides" or something similar to it. What do you think? |
Please send the patch file inline What's wrong with the current docs for the skeleton using the Babel plugin? Doesn't it do this for you? |
babel-plugin is working as expected now. Before, I had some troubles with changing babel.config.js. |
Same problem here, I tried with the same patch but it's still not working. Any updates? |
This solution worked for me using React Native CLI: Install react-native-linear-gradient: Replace all instances of: Files where the change is needed:
This should resolve the issue when using React Native CLI instead of Expo. |
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
getting this weird error while trying to use moti with react native only
my package json contains these packages
Expected Behavior
getting this weird error while trying to use moti with react native only
my package json contains these packages
Steps To Reproduce
create new react native project with npx react-native init project
install moti package
instal reanimated package
use in in the code
Versions
Screenshots
Reproduction
npx create-react-native-app -t with-moti
The text was updated successfully, but these errors were encountered: