Error – 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 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

4 thoughts on “Error – No component found for view with the name “RNSVGRect”

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

  2. 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.

  3. I fixed, follows this:
    Checked your Xcode project
    1、RNSVG.xcodeproj in “Libraries”
    2、libRNSVG.a in “Link Binary With Libraries”
    3、$(SRCROOT)/../node_modules/react-native-svg/ios in “Header Search Paths”

    re-run is work.

Comments are closed.

Error – 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 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

4 thoughts on “Error – No component found for view with the name “RNSVGRect”

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

  2. 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.

  3. I fixed, follows this:
    Checked your Xcode project
    1、RNSVG.xcodeproj in “Libraries”
    2、libRNSVG.a in “Link Binary With Libraries”
    3、$(SRCROOT)/../node_modules/react-native-svg/ios in “Header Search Paths”

    re-run is work.

  4. Pingback: replica rolex

Comments are closed.