Unable to resolve SVG file
See original GitHub issueHi, 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:
- Created 4 years ago
- Reactions:9
- Comments:8 (1 by maintainers)
Top 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 >
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
How about those not using expo?
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