No component found for view with name "RNSVGCircle"
On iOS, only using the example components from the repo. React v. 15.4.2, React-Native v. 0.42.0, and react-native-svg v. 5.1.5
(I did react-native link it)
import Svg, {
Circle,
Ellipse,
G,
LinearGradient,
RadialGradient,
Line,
Path,
Polygon,
Polyline,
Rect,
Symbol,
Use,
Defs,
Stop } from 'react-native-svg';
class PieCircle extends Component{
static title = 'Draw a Pie shape with circle';
render() {
return <Svg
height="100"
width="100"
>
<Circle
cx="50"
cy="50"
r="40"
fill="#ddd"
/>
<Circle
origin="50, 50"
rotate="-90"
cx="50"
cy="50"
r="20"
stroke="#0074d9"
strokeWidth="40"
fill="none"
strokeDasharray="80, 160"
/>
</Svg>
}
}
up
I have same problem.
Any feedback from the creator on this?
Have the same problem. Did someone find a solution?
@YanaKopyshchyk you have to upgrade this svg library. It has been recently released
how recently @Snorlock ? using "react-native-svg": "^5.1.6" and having the same problem
Following these issues: https://github.com/react-native-community/react-native-svg/issues/288 ⬇️ https://github.com/react-native-community/react-native-svg/issues/259 They say that it should be fixed in 5.1.6
But i see that im currently using master: "react-native-svg": "github:react-native-community/react-native-svg#master", And it works
Damn, no luck using master as well! :S
@Snorlock I have the latest version 5.1.6, but, unfortunately, the problem is still there
Thats weird, have you cleared derived data? Done a new pod install? Im pretty sure atleast master works
I deleted node_modules and reinstalled everything, maybe something wrong with react-native link. @eemebarbe Have you solved this problem? With react-native 0.42.3 works, but not with 0.41.2
I never used react-native link. Do you use cocoapods and swift? Or either or, @YanaKopyshchyk?
I don't use cocoapods and swift. Anyway, I think the problem is in the mismatch of the versions :(
@YanaKopyshchyk you solved the problem in any way?
@mariobento yes, but the problem was not with react-native-svg. I use react-native-maps and everything started working when I updated it to 0.13.0. ( Before the update everything worked except svg, but I had 'build failed' )
I had this problem. I didn't remember that I used yarn to install react-native-svg and used brew (Homebrew) to install yarn, but then I updated yarn with brew by running in the terminal "brew upgrade yarn" and then ran "yarn upgrade" to save the new dependencies. After that, everything is working fine in yarn 0.24.4 and [email protected].
I really hope this helps anyone struggling as I did.
I'm running into this problem as well. Created a new project (react-native init), added react-native-svg, manually linked on iOS, reset the cache, cleared watchman, and tried all of the demos. Both the latest version (5.2.0 at time of writing) and master fail.
Has anyone come up with a solution?
dependencies:
react-native: 0.45.0
react: 16.0.0-alpha.12
PS:
It's not just RNSVGCircle that doesn't work - all of the named imports have their respective errors. However, just using <Svg /> in the codebase results in the following error in the console:
Warning: Native component for "RNSVGSvgView" does not exist
So the way I got around this problem was by individually importing in each component. import Rect from 'react-native-svg'; import Svg from 'react-native-svg'; import Circle from 'react-native-svg'; etc...
I got the "No component found.." error as well.
I have: react@16.0.0-alpha.12 react-native@0.45.1 react-native-svg@5.2.0
I tried linking and unlinking, reinstalling and restarting all the things. In my case, I noticed this error when running react-native run-ios:
2017-06-20 11:42:47.870 xcodebuild[60263:1870365] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 1267. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2017-06-20 11:42:47.873 xcodebuild[60263:1870365] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 1267. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2017-06-20 11:42:47.874 xcodebuild[60263:1870365] Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 1" UserInfo={NSDebugDescription=Unexpected character / at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Missing ';' on line 1267" UserInfo={NSDebugDescription=Missing ';' on line 1267}}
and in line 1267 in my project.pbxproj I saw:
HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-navigation/ios/**""$(SRCROOT)/../node_modules/react-native-svg/ios/**";
so I changed it to:
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/../node_modules/react-native-navigation/ios/**",
"$(SRCROOT)/../node_modules/react-native-svg/ios/**",
);
Not exactly sure how that happened but it ended up working for me.
What eventually worked for me was building and running with Xcode (pressing play in Xcode vs react-native run-ios). After doing that once, react-native run-ios started working. :)