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

Invariant Violation: Native Component component for "RNSpinkit" does not exist

Open johnanisere opened this issue 7 years ago • 25 comments

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>
    );
  }
}

johnanisere avatar Feb 09 '18 17:02 johnanisere

the same issue

ValentinBlokhin avatar Feb 09 '18 20:02 ValentinBlokhin

me too

rob-64 avatar Feb 16 '18 02:02 rob-64

It wont work for expo project.

tharzeez avatar Feb 20 '18 14:02 tharzeez

@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

ramey502 avatar Feb 22 '18 09:02 ramey502

same issue here

anish000kumar avatar Mar 10 '18 13:03 anish000kumar

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!

minhanhnguyen2196 avatar Apr 02 '18 09:04 minhanhnguyen2196

Same here. Any updates or official response on this?

yoaquim avatar Jun 20 '18 16:06 yoaquim

Same here, for both android and iOS, anybody can help ?

MayeuldP avatar Jul 24 '18 13:07 MayeuldP

For iOS, from your project's root directory:

cd ios/ pod install

thorlando avatar Aug 27 '18 22:08 thorlando

cd your project folder react-native link react-native-spinkit reopen your IDE & run

A-Happy-Fish avatar Sep 19 '18 08:09 A-Happy-Fish

doesn't it working on Expo ???

samhoseinkhani avatar Dec 14 '18 13:12 samhoseinkhani

@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.

shuiRong avatar Feb 01 '19 09:02 shuiRong

  1. react-native link react-native-spinkit
  2. pod install

imbaTao avatar Apr 12 '19 06:04 imbaTao

Has anyone found a solution for this? There is no RNSpinkit.xcodeproj in my Xcode, I am working with version 10.1. All the other suggestions like react-native link, my rnspinkit is already linked. Where is it supposedly looking for it that it cannot find it?

Its in my MainApplication.java, its in my Loading.js file, its in my package.json file, its in my package-lock.json file, its in my ios/appName.xcodeproj/project.pbxproj file, its in my settings.gradle file and its in my build.gradle file, so where else is it supposed to be that it does not find RNSpinkit?

I am working with React Native 0.53.3 and React 16.2

I have tried everything I have found online short of upgrading react native and I started down that road but it would delete all my AppCenter/ directory.

ldco2016 avatar Jun 03 '19 14:06 ldco2016

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

FortunaRegem avatar Jul 24 '19 10:07 FortunaRegem

Doesn't seems to work if using Expo.

rafaelcavalcante avatar Nov 06 '19 13:11 rafaelcavalcante

It may be occuring because one of two reasons,

First, may be package isn't linked correctly. For that,

react-native link should fix it.

Secondly, even if it is linked correctly then the package needs to be imported inside MainApplication.java file. For that,

Add a import at top of file,

import com.react.rnspinkit.RNSpinkitPackage;

and then inside getPackages() method add new RNSpinkitPackage(),

Problem should be fixed.

afrozopsy avatar Feb 14 '20 17:02 afrozopsy

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

afrozopsy avatar Feb 14 '20 17:02 afrozopsy

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

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

rafaelcavalcante avatar Feb 14 '20 17:02 rafaelcavalcante

@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

flaviocnn avatar Apr 07 '20 11:04 flaviocnn

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

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

Can you describe the solution please ?

gurkanguran avatar Apr 17 '20 14:04 gurkanguran

I am also seeing this issue with [email protected] and [email protected]

joe307bad avatar Jun 03 '20 20:06 joe307bad

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!

if terminal says "command not found: gradlew" run ./gradlew clean

KandarpAjvalia avatar Jul 01 '20 22:07 KandarpAjvalia

It does not work for android. IOS has been compiled successfully tho. I tried to link this lib manually but app keeps crashing on android.

RN: 0.63.2

Wentris71 avatar Mar 13 '21 08:03 Wentris71

@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

It seems Expo doesn't handle this Library

vahidpourmohamad avatar Jul 19 '22 11:07 vahidpourmohamad