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.

Error - No component found for view with the name "RNSVGRect"

See original GitHub issue

I’m just starting to use the library and started by simply pasting the bit of code given in the example, but although I’ve installed and imported all the elements as indicated, I get this error message… Am I missing something obvious ?

The bit of code :

   <Svg height="100" width="100">
      <Rect x="0" y="0" width="100" height="100" fill="black" />
      <Circle cx="50" cy="50" r="30" fill="yellow" />
      <Circle cx="40" cy="40" r="4" fill="black" />
      <Circle cx="60" cy="40" r="4" fill="black" />
      <Path d="M 40 60 A 10 10 0 0 0 60 60" stroke="black" />
    </Svg>;

The imports: import { Svg, Circle, Line, Rect, Path, } from 'react-native-svg';

And the error message :

screen shot 2016-07-19 at 16 04 52

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15

github_iconTop GitHub Comments

24reactions
magicismightcommented, Jul 20, 2016

It seems like you havent link the native code for the project. Run react-native link react-native-svgorrnpm link react-native-svg`

14reactions
fdnhkjcommented, Oct 11, 2016

After doing rpm link, you need to re-run the app by executing react-native run-ios or react-native run-android depending on the platform you’re using.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No component found for view with the name "RNSVGRect ...
I'm just starting to use the library and started by simply pasting the bit of code given in the example, but although I've...
Read more >
No component found for view with name " RNSVGViewBox "
I keep getting this error although I'm following this https://formidable.com/open-source/victory/docs/native and I just started by the first ...
Read more >
[Solved]-(react-native-svg Error) "Tried to register two views ...
Coding example for the question (react-native-svg Error) "Tried to register two views with the same name RNSVGRect"-Reactjs.
Read more >
react-native-router-flux/CHANGELOG.md - UNPKG
67, - Error: There is no route defined for key undefined. ... 206, - Invariant Violation: View config not found for name RNSVGRect ......
Read more >
react-native-svg - npm
Easy to convert SVG code to react-native-svg. ... found a spec conformance bug, then you can test using your component in a react-native-web ......
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