Skip to content
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

ERROR : Native component for "RNSVGLinearGradient" does not exist #30

Open
mohammad-goldast opened this issue Apr 4, 2018 · 6 comments

Comments

@mohammad-goldast
Copy link

mohammad-goldast commented Apr 4, 2018

Hello everyone, when use react-native-shadow, i got same error like this :

`Invariant Violation: Native component for "RNSVGLinearGradient" does not exist

This error is located at:
in RNSVGLinearGradient (at LinearGradient.js:29)
in LinearGradient (at BoxShadow.js:63)
in RNSVGDefs (at Defs.js:8)
in Defs (at BoxShadow.js:62)
in RNSVGSvgView (at Svg.js:94)
in Svg (at BoxShadow.js:61)
in RCTView (at View.js:112)
in View (at BoxShadow.js:60)
in BoxShadow (at Card.js:18)
in Card (at loginForm.js:12)
in LoginForm (at authPage.cmp.js:90)
in RCTView (at View.js:112)
in View (at authPage.cmp.js:72)
in AuthPage (created by Connect(AuthPage))
in Connect(AuthPage) (at Navigation.js:83)
in Provider (at Navigation.js:82)
in _class2 (at renderApplication.js:35)
in RCTView (at View.js:112)
in View (at AppContainer.js:102)
in RCTView (at View.js:112)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:34)`

I installed this package by : npm i --save react-native-shadow and npm i --save react-native-svg.

Here is my code :
const Card = ({style, children}) => { const shadowOpt = { width:100, height:100, color:"#000", border:2, radius:3, opacity:0.2, x:0, y:3, style:{marginVertical:5} } return( <BoxShadow setting={shadowOpt}> <View style={[styles.cardStyle, style]} > { children } </View> </BoxShadow> ) }

Also maybe need these information :
"react": "16.0.0", "react-native": "0.51", "react-native-shadow": "^1.2.2", "react-native-svg": "^6.3.1",

@mohammad-goldast mohammad-goldast changed the title ERROR : ERROR : Native component for "RNSVGLinearGradient" does not exist Apr 4, 2018
@matveychuk
Copy link

the same problem

@danielland85
Copy link

same problem here

@rishiankush
Copy link

same problem here too

@artemgrygor
Copy link

I had the same problem. It works for me after react-native link react-native-svg. Also close your iPhone emulator and restart the project again.

@ZhangYi0415
Copy link

you have to config your project to support the SVG component we use( react-native-svg - Link)

do not forget : react-native link react-native-svg

@Yhozen
Copy link

Yhozen commented Jan 11, 2020

For RN > 0.60 remember to do

cd ios/ 
pod install

and then react-native run-ios again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants