-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No component found for view with name "RNSVGRect" : latest version used, no peer dependency errors #382
Comments
This is related to Issue #279 I tried following the steps that elainen wrote down, however this did not solve the problem. Then, I attempted to follow the steps Andregreen wrote. This worked halfway: I didn't get the error, but instead of a circle on a square that is provided in the example code, I got two squares that were the size of the viewing area. Until this issue is fixed, I am reverting to PNGs for my projects. |
For me this solves the problem #387 . Remove “libRNSVG-tvOS.a” in xcode and restart the project. Svg will work just fine. |
I solved this problem by adding RNSVG.xcodeproj(from node_modules/react-native-svg/ios/) into my rn project. react-native 0.46.0 |
Seems like a linking error. Instructions available in readme now. |
Encounter same problem but solved by:
version using: |
I've searched and have found similar issues that have been closed in the recent past, but I cannot figure out why I'm getting this issue. Also, there seems to be similar ones, but I get this error with out any peer dependency errors.
When attempting to render the SVG by calling the class, the error gets thrown. Dismissing the error in my iOS simulator will show the SVG viewing area (a box with a red border) but not the filled Rectangle.
ERROR:
`No component found for view with name "RNSVGRect"
-[RCTUIManager createView:viewName:rootTag:props:]
RCTUIManager.m:1007
invoking_
-[NSInvocation invoke]
-[NSInvocation invokeWithTarget:]
-[RCTModuleMethod invokeWithBridge:module:arguments:]
facebook::react::RCTNativeModule::invokeInner(unsigned int, folly::dynamic const&&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_queue_serial_drain
_dispatch_queue_invoke
_dispatch_root_queue_drain
_dispatch_worker_thread3
_pthread_wqthread
start_wqthread`
Code to follow:
package.json
{ "name": "geEnglishApp", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "react": "16.0.0-alpha.12", "react-native": "0.45.1" }, "devDependencies": { "babel-jest": "20.0.3", "babel-preset-react-native": "2.0.0", "jest": "20.0.4", "react-test-renderer": "16.0.0-alpha.12" }, "jest": { "preset": "react-native" } }
sample code with SVG put in for testing purposes. index.ios.js
`/**
Sample React Native App
https://github.com/facebook/react-native
@flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import Svg,{
Circle,
Ellipse,
G,
LinearGradient,
RadialGradient,
Line,
Path,
Polygon,
Polyline,
Rect,
Symbol,
Use,
Defs,
Stop
} from 'react-native-svg';
export default class geEnglishApp extends Component {
render() {
return (
Welcome to React Native!
To get started, edit index.ios.js
Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu
);
}
}
class SvgExample extends Component {
render() {
return (
<Svg
width="200"
height="60"
); } }
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('geEnglishApp', () => geEnglishApp);
The text was updated successfully, but these errors were encountered: