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 : Native component for "RNSVGLinearGradient" does not exist

See original GitHub issue

Hello everyone, when i use react-native-shadow with react-native-svg , 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",

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:25

github_iconTop GitHub Comments

13reactions
HengCCcommented, Sep 25, 2018

Same problem , i’ve linked native code through react-native link react-native-svg

it’s still throw an error:

Invariant Violation: requireNativeComponent: "RNSVGLinearGradient" was not found in the UIManager.
11reactions
msandcommented, Jun 8, 2018

Have you linked it? https://github.com/react-native-community/react-native-svg/blob/master/README.md#installation

  1. Link native code

react-native link react-native-svg

Read more comments on GitHub >

github_iconTop Results From Across the Web

Native component for "RNSVGLinearGradient" does not exist ...
Hello everyone, when i use react-native-shadow with react-native-svg , i got same error like this : Invariant Violation: Native component ...
Read more >
requireNativeComponent: 'RNSVGLinearGradient' was not ...
Just make sure you have installed react-native-svg and then delete the App, restart the metro bundler and rebuilt the App again. Should work....
Read more >
react-native-svg - npm
react-native-svg provides SVG support to React Native on iOS, Android, macOS, Windows, and a compatibility layer for the web.
Read more >
react-native-shadow - Bountysource
Hello everyone, when use react-native-shadow , i got same error like this : `Invariant Violation: Native component for "RNSVGLinearGradient" does not exist.
Read more >
Invariant Violation: requireNativeComponent: BVLinearGradient was ...
Answers related to “Invariant Violation: requireNativeComponent: BVLinearGradient was not found in the UIManager. This error is located at: in BVLinearGradient ...
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