jgrancher / react-native-sketch

🎨 A React Native <Sketch /> component for touch-based drawing.
http://npm.im/react-native-sketch
MIT License
646 stars 67 forks source link

Invariant Violation: Native component for "RNSketch" does not exist #45

Open tmehta2442 opened 6 years ago

tmehta2442 commented 6 years ago

Hi! Maybe there is something wrong with my app, since I've tried a few other ways to daw an image / capture a signature and have been getting the same error.

Here's my system info: Environment: OS: macOS High Sierra 10.13.4 Node: 9.5.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: Not Found Xcode: Xcode 9.3.1 Build version 9E501 Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: ^0.55.4 => 0.55.4

And full rundown of the error I am getting: Invariant Violation: Native component for "RNSketch" does not exist

This error is located at: in RNSketch (at index.ios.js:69) in Sketch (at SelectVehicleScreen.js:15) in RCTView (at View.js:60) in View (at SelectVehicleScreen.js:14) in MyPaint (at SceneView.js:10) in SceneView (at StackViewLayout.js:424) in RCTView (at View.js:60) in View (at StackViewLayout.js:423) in RCTView (at View.js:60) in View (at StackViewLayout.js:422) in RCTView (at View.js:60) in View (at createAnimatedComponent.js:154) in AnimatedComponent (at StackViewCard.js:12) in Card (at createPointerEventsContainer.js:28) in Container (at StackViewLayout.js:484) in RCTView (at View.js:60) in View (at StackViewLayout.js:381) in RCTView (at View.js:60) in View (at StackViewLayout.js:380) in StackViewLayout (at withOrientation.js:30) in withOrientation (at StackView.js:61) in RCTView (at View.js:60) in View (at Transitioner.js:146) in Transitioner (at StackView.js:22) in StackView (at createNavigator.js:96) in Navigator (at createKeyboardAwareNavigator.js:11) in KeyboardAwareNavigator (at createNavigationContainer.js:366) in NavigationContainer (at App.js:42) in App (at registerRootComponent.js:35) in RootErrorBoundary (at registerRootComponent.js:34) in ExpoRootComponent (at renderApplication.js:33) in RCTView (at View.js:60) in View (at AppContainer.js:102) in RCTView (at View.js:60) in View (at AppContainer.js:122) in AppContainer (at renderApplication.js:32)

Not doing any super special:

  1. npm start
  2. "R" to refresh
  3. "a" for my android emulator
  4. Expo starts up and I get the above error.

I should also note that I am using the example code in its entirety to try to minimize the possibility I am doing something silly ("Usage" @ https://github.com/jgrancher/react-native-sketch).

Any help is appreciated!

DiegoDevBittencourt commented 5 years ago

screenshot_1542137506 I have a similar issue, did you fixed your?

tmehta2442 commented 5 years ago

Hello There,

Unfortunately, I never got it to work. I eventually moved to using https://github.com/RepairShopr/react-native-signature-capture, since it saved as an image (rather than a SVG) which made other features of my app a bit easier to handle as well!

Hope that helps.

DiegoDevBittencourt commented 5 years ago

I tried this react-native-signature-capture too but I'm facing a issue, I just can't draw dots you know?! When user do a small touch on screen, nothing happens. So I have to move my finger a little bit to the drawing appear. It's annoyng. Do you know how to fix it?

jvink commented 4 years ago

Same issue