react-native-twitterkit icon indicating copy to clipboard operation
react-native-twitterkit copied to clipboard

Native component doesn't exist

Open iamkhush opened this issue 7 years ago • 1 comments

I have installed this package and also ran react-native link react-native-twitterkit. It responded with -

(node:24606) ExperimentalWarning: The fs.promises API is experimental rnpm-install info Linking react-native-twitterkit ios dependency rnpm-install info Platform 'ios' module react-native-twitterkit has been successfully linked rnpm-install info Linking react-native-twitterkit android dependency rnpm-install info Platform 'android' module react-native-twitterkit has been successfully linked

Now when I run the app on emulator with the following App.js

import React from 'react'; import {TweetView} from 'react-native-twitterkit'; import { StyleSheet, Text, View, ScrollView } from 'react-native';

// import { requireNativeComponent } from 'react-native'; // const TweetView = requireNativeComponent('TweetView', null);

export default class App extends React.Component { render() { return ( <TweetView tweetid={'873299426923601921'} /> ); } }

Error -

Invariant Violation: Native component for "TweetView" does not exist

This error is located at: in TweetView (at App.js:13) in App (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) getViewConfig requireNativeComponent.js:107:6 get$1 ReactNativeRenderer-dev.js:14131:17 createInstance ReactNativeRenderer-dev.js:14295:27 completeWork ReactNativeRenderer-dev.js:10097:14 completeUnitOfWork ReactNativeRenderer-dev.js:12769:10 performUnitOfWork ReactNativeRenderer-dev.js:12941:32 workLoop ReactNativeRenderer-dev.js:12953:43 renderRoot ReactNativeRenderer-dev.js:12996:17 performWorkOnRoot ReactNativeRenderer-dev.js:13632:34 performWork ReactNativeRenderer-dev.js:13545:26 performSyncWork ReactNativeRenderer-dev.js:13506:16 requestWork ReactNativeRenderer-dev.js:13392:6 scheduleWorkImpl ReactNativeRenderer-dev.js:13259:24 scheduleWork ReactNativeRenderer-dev.js:13207:28 scheduleRootUpdate ReactNativeRenderer-dev.js:13930:17 _updateContainerAtExpirationTime ReactNativeRenderer-dev.js:13966:6 updateContainer ReactNativeRenderer-dev.js:13991:8 render ReactNativeRenderer-dev.js:14726:35 renderApplication renderApplication.js:49:21 run AppRegistry.js:102:10 runApplication AppRegistry.js:194:26 __callFunction MessageQueue.js:351:47 MessageQueue.js:116:26 __guardSafe MessageQueue.js:314:6 callFunctionReturnFlushedQueue MessageQueue.js:115:17

iamkhush avatar Jul 30 '18 05:07 iamkhush

This most likely means that you have not included the native code into your application build.

On which platform are you testing on? Do you use cocoapods on iOS or not?

ognen avatar Jul 30 '18 09:07 ognen