expo install react-native-svg: installs a not working version
See original GitHub issue🐛 Bug Report
Summary of Issue (just a few sentences)
When I install react-native-svg using expo install it installs version 11.0.1 but I get this error from Metro when opening my app:
Unable to resolve "./LocalSvg" from "node_modules\react-native-svg\src\ReactNativeSVG.ts"
Environment
SDK 37
Expected Behavior vs Actual Behavior
I installed the latest version (12.1.0) now its working but i get the dependencies are not compatible warning.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
expo install react-native-svg "error Running this command will ...
expo install react -native-svg "error Running this command will add the dependency to the workspace root rather than the workspace itself...".
Read more >Svg - Expo Documentation
Svg. react-native-svg allows you to use SVGs in your app, with support for interactivity and animation. Platform ...
Read more >5 common errors found in a React Native app (using Expo)
When creating a mobile app with React Native, you can use Expo to streamline some complexities. Meet the most common errors and how...
Read more >Working with SVGs in React Native - OpenReplay Blog
expo install react -native-svg-tutorial ... Expo Go App to run the app. (Note: the installation of an emulator isn't covered in this article.) ......
Read more >react-native-svg - npm
SVG library for react-native. Latest version: 13.6.0, last published: a month ago. Start using react-native-svg in your project by running ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Well that was a strange issue, but I figured it out. Thanks for the suggestions @FiberJW. As it turned out, I needed to clear my watchman & expo caches (cachi? cachie?)
Here’s a link to the steps I took to do so. I know it’s outdated, but the commands to clear the caches worked. Thanks again for your help!
@ryekerjh do you have another dependency that uses react-native-svg 12.X? Maybe pinning the version to 11.0.1 could help solve any mismatches (using resolutions or something similar).
It might also help to try upgrading to SDK 38 since we bumped the react-native-svg version in that release: https://github.com/expo/expo/blob/bf7e261cdc06fc9ec84e5f5735e7871901efa340/CHANGELOG.md#3800