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.

Unable to resolve SVG file

See original GitHub issue

Hi, I’ve been trying to import SVG file to use in my react-navigation file as an icon. I installed the library as you write in the readme file. But, I got an error.

Unable to resolve "./assets/icons/bottom_tab/profile_active.svg" from "MainNavigation.js" Failed building JavaScript bundle.

I’ve been checked my file, and I’m really sure that the svg file is in right directory.

My environment:

  • expo: 33
  • react-native-svg: 9.4.0
  • react-native-svg-transformer: 0.13.0

I got this error on both android and ios.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
AnayoOlerucommented, Aug 31, 2020

How about those not using expo?

2reactions
zanechuacommented, Jul 30, 2019

For those using expo, most likely it’s due to the breaking change of the new expo-cli v3.

Please see: https://github.com/expo/expo-cli/issues/875

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not resolve module · Issue #1165 - GitHub
While trying to resolve module react-native-svg from file /project/assets/illustrations/demo.svg , the package ...
Read more >
Webpack can't resolve svg - Stack Overflow
i think you need to use url_loader within webpack to load svgs the same way you loading scss . and then import it...
Read more >
react-native-svg - npm
react-native-svg provides SVG support to React Native on iOS, Android, macOS, Windows, and a compatibility layer for the web.
Read more >
unable to resolve module assets react native - You.com
Open the runAndroid.js file in Notepad editor. 4. Find cwd: scriptsDir in const procConfig block.
Read more >
Developers - Jitsi Community Forum
error: bundling failed: Error: Unable to resolve module ./add.svg from react/features/base/icons/svg/index.js : None of these files exist:
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