question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ryekerjhcommented, Jul 22, 2020

@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

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!

1reaction
FiberJWcommented, Jul 22, 2020

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found