Invariant Violation: View config not found for name <svg width
See original GitHub issueReact native info output:
System:
OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Memory: 1.40 GB / 11.60 GB
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/bin/node
Yarn: 1.17.3 - /usr/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5314842
npmPackages:
react: 16.8.6 => 16.8.6
react-native: ^0.60.4 => 0.60.4
Steps To Reproduce Before: yarn add react-native-svg yarn add react-native-svg-transformer -D
After Enable hermes yarn add babel-plugin-inline-import -D
myComponent.js
import React from "react";
import { Platform } from "react-native";
import IconHome from "./../imgs/icon/home.svg";
export const Home = props => ( <IconHome { ...props } width={22} height={22} /> );
...
screen.js
import { Search, Genero, MinhasMusicas, Home } from "./../components/Icon";
<Home key={1} />
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Invariant Violation: View config not found for name <svg width
Actually, it seems the transformer isn't working/configured correctly. Seems you're trying to use the svg string as a component, rather than an ...
Read more >react-native: Get error, invariant violation: View config not ...
Try linking React Native SVG manually. Add the following to 'android/settings.gradle'.
Read more >[Solved]-Invariant Violation: View config not found for name view
Coding example for the question Invariant Violation: View config not found for name view : React Native-React Native.
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 >Options - SVGR
If value is omitted, it uses 1em in order to make SVG size inherits from text size. ... SVGO will be configured not...
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
I also have not tested the compatibility of
react-native-svg-transformer
with React Native 0.60.x yet.Okay, this issue seems to be going quite off-topic. Please open a new issue with the specific problem if there still is one.