react-native-spinkit: Invariant Violation: Native Component component for "RNSpinkit" does not exist

When i tried to use this module I get this Error “Invariant Violation: Native Component component for “RNSpinkit” does not exist”

Here is my code:

import React from 'react';
import { View,Text,TouchableOpacity} from 'react-native';
import styles,{colors} from './styles/style'
import Spinner  from 'react-native-spinkit'


export default class App extends React.Component {

  render() {
    return (
      <View style={styles.container}>
        <View>
          <Spinner isVisible={true} size={100} type='Wave' color='white'/>
        </View>
      </View>
    );
  }
}

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 8
  • Comments: 25

Most upvoted comments

For iOS, from your project’s root directory:

cd ios/ pod install

In your project’s folder:

  1. react-native link react-native-spinkit
  2. cd android & gradlew clean
  3. cd … and react-native run-ios/android Problem solved!

Doesn’t seems to work if using Expo.

doesn’t it working on Expo ???

I try to link the package but i get this error: Package react-native-spinkit has been ignored because it contains invalid configuration. Reason: “commands” must be an array

Using: react-native 0.60.4

@johnanisere “react-antive link” is not finish, and you can jump to these links ios, or android,and I have found whole ios’s directory。 If this problem is still exists, you can @ me. 9a229631-dc7a-44d2-be6d-92d422645413 62a2a57c-8fb0-4519-a9b7-dbf1d14c8056

@rafaelcavalcante it won’t work with expo. It uses native modules.

We kinda solved this issue. But thanks for the reply, afrozopsy 😃

Hi, you solved it? It works with expo? thank you

@johnanisere “react-antive link” is not finish, and you can jump to these links ios, or android,and I have found whole ios’s directory。 If this problem is still exists, you can @ me. 9a229631-dc7a-44d2-be6d-92d422645413 62a2a57c-8fb0-4519-a9b7-dbf1d14c8056

(issue in Android) Thank you. I checked my MainApplication.java file and don’t found import com.react.rnspinkit.RNSpinkitPackage; and new RNSpinkitPackage(). It works after I append it.

It wont work for expo project.