Giter Club home page Giter Club logo

Comments (50)

pfeghali avatar pfeghali commented on May 28, 2024 35

I don't think this should be closed - this did not fix it for me, I am still getting the same error

from react-native-slider.

techtunix avatar techtunix commented on May 28, 2024 30

Do it like this!

1- npm install @react-native-community/slider –save
2- react-native link @react-native-community/slider
3- include in your script file like import { Slider } from 'react-native' instead of import Slider from '@react-native-community/slider';

then expo start --clear

hopefully work for someone.

from react-native-slider.

aidanw avatar aidanw commented on May 28, 2024 29

Do pod install in your ios folder and it works (for me).

from react-native-slider.

kurtmcintire avatar kurtmcintire commented on May 28, 2024 13

I'm seeing the same issue. Invariant violation: requireNativeComponent: "RNCSlider" was not found in the UIManager. I've tried re-linking using react-native link and react-native link @react-native-community/slider. I've tried running a manual pod install in the ios folder. And I've also tried blowing out and resetting all node modules.

My instance of Slider is imported like this:
import Slider from "@react-native-community/slider";

react-native-cli: 2.0.1
react-native: 0.59.4
react-native-slider: 1.1.3

Anyone else still seeing this issue?

from react-native-slider.

LG1710 avatar LG1710 commented on May 28, 2024 11

You need to link and it works :
react-native link @react-native-community/slider

from react-native-slider.

bakkelim avatar bakkelim commented on May 28, 2024 8

I don't think this should be closed - this did not fix it for me, I am still getting the same error

Same for me.
One thing to note is that I use Expo and have not ejected the app.
Do I have to eject the app in order to use this slider or should it work with Expo as well?

from react-native-slider.

ajjubbal avatar ajjubbal commented on May 28, 2024 8

Running the following worked for me:

$ react-native link @react-native-community/slider
$ cd ios/
$ pod install
$ cd ..
$ npm run run:ios

That being said your README needs to be updated with this and your example needs to be fixed either with complete instructions on how to build and run or make it less cumbersome to run.

from react-native-slider.

ashish-padakannaya avatar ashish-padakannaya commented on May 28, 2024 6

Do it like this!

1- npm install @react-native-community/slider –save
2- react-native link @react-native-community/slider
3- include in your script file like import { Slider } from 'react-native' instead of import Slider from '@react-native-community/slider';

then expo start --clear

hopefully work for someone.

Please accept my knees.

from react-native-slider.

buschco avatar buschco commented on May 28, 2024 6

@techtunix Whats the point of adding and linking the @react-native-community/slider at all if you use the deprecated one from react-native?

from react-native-slider.

joIivier avatar joIivier commented on May 28, 2024 5

I had the same issue and for me this was due to the fact that I had overridden the ReactPackages in MainApplication.getPackages(). I had to add new ReactSliderPackage(); (imported from com.reactnativecommunity.slider.ReactSliderPackage;) to the returned list to fix this.

I don't know the iOS variant for this but the idea is that you have to ensure your native code advertises all the native packages you need, including your dependencies. react-native link doesn't do that (and should probably warn about ?).

from react-native-slider.

webraptor avatar webraptor commented on May 28, 2024 5

Yeah, exactly what @LG1710 said - you need to run react-native link @react-native-community/slider. Please check https://github.com/react-native-community/react-native-slider/blob/master/README.md for further instructions.

Readme doesn't contain that ...

from react-native-slider.

sandunmj avatar sandunmj commented on May 28, 2024 3

Do it like this!

1- npm install @react-native-community/slider –save
2- react-native link @react-native-community/slider
3- include in your script file like import { Slider } from 'react-native' instead of import Slider from '@react-native-community/slider';

then expo start --clear

hopefully work for someone.

This worked for me.

from react-native-slider.

afilp avatar afilp commented on May 28, 2024 2

Can you reopen this please?

I also have the same problem with RN 0.63.

Shouldn't "autolinking" work without any other intervention from us? Is this the problem? The "autolinking" fails somehow?
It appears that with manual linking it works, so I would recommend that this is considered a problem (bug?) with the "autolinking" process.

Thanks!

from react-native-slider.

princiya avatar princiya commented on May 28, 2024 1

+1 I have the same error.

from react-native-slider.

michalchudziak avatar michalchudziak commented on May 28, 2024 1

Yeah, exactly what @LG1710 said - you need to run react-native link @react-native-community/slider. Please check https://github.com/react-native-community/react-native-slider/blob/master/README.md for further instructions.

from react-native-slider.

rckahale avatar rckahale commented on May 28, 2024 1

In my case it didn't work after re-linking.
This fixed it

  • npm start -- --reset-cache
  • Followed by installed app deletion from emulator/device.
  • Then react-native run-<os>

from react-native-slider.

brlocky avatar brlocky commented on May 28, 2024

I got the same

https://take.ms/tSM5O

from react-native-slider.

nikonhub avatar nikonhub commented on May 28, 2024

+1

from react-native-slider.

LG1710 avatar LG1710 commented on May 28, 2024

+1

from react-native-slider.

aidanw avatar aidanw commented on May 28, 2024

I think I am also suffering from this problem. @michalchudziak could you look again?

This is the commit from running react-native link @react-native-community/slider

https://github.com/fo-am/iCrapAppPro/commit/0ab743a8ce1d05bf41b6ed122a2da8b12e4e9a61

I am okay on Android, but on Ios I get

Invariant Violation: Invariant Violation: Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager.

The manual installation method has me drag something from PushNotificationIOS into my xcode... is this really what is meant?

from react-native-slider.

bobber205 avatar bobber205 commented on May 28, 2024

Having the same issue -- link command worked fine but for some reason I'm getting that same error.

I don't think the RN team should be alerting people to switch over to this package until this is resolved. Lots of man hours wasted collectively speaking.

from react-native-slider.

pfeghali avatar pfeghali commented on May 28, 2024

@aidanw what if users do not want to eject their application? This seems like a more fundamental issue with a native component that should not be breaking.

from react-native-slider.

aidanw avatar aidanw commented on May 28, 2024

I have never used any of the not ejected stuff so I am not sure of the limitations... but yeah this pretty fundamental ui element being funky is bad news.

from react-native-slider.

bobber205 avatar bobber205 commented on May 28, 2024

pod install fixed it for me as well -- I was under the assumption that the react native link did it as well? :P

from react-native-slider.

LLesage avatar LLesage commented on May 28, 2024

pod install if you're using cocoapods in your project. Worked for me.

from react-native-slider.

 avatar commented on May 28, 2024

Same error here
RNCSlider was not found in uimanager
"@react-native-community/slider": "^1.1.2",

from react-native-slider.

bobber205 avatar bobber205 commented on May 28, 2024

@muhammadwfa Did pod install not do the trick for you?

from react-native-slider.

 avatar commented on May 28, 2024

Actually this was not an issue
I solved by react-native-link
@bobber205

from react-native-slider.

Stunner avatar Stunner commented on May 28, 2024

How did you end up solving it? @muhammadwfa

from react-native-slider.

 avatar commented on May 28, 2024

by linking

react-native link @react-native-community/slider

from react-native-slider.

cmacdonnacha avatar cmacdonnacha commented on May 28, 2024

Does this work without ejecting Expo?

from react-native-slider.

67millwood avatar 67millwood commented on May 28, 2024

I've cleared cache, linked, ejected etc. No luck. I've seen bits online that it won't work with Expo but possibly i've read that wrong. Not explicit in the readme so assume that isn't the case.

from react-native-slider.

strobox avatar strobox commented on May 28, 2024

Same. Not working.

from react-native-slider.

webraptor avatar webraptor commented on May 28, 2024

Same. Not working.

Depending on your RN version you should either be on 1.X.X or 2.X.X.
after linking, make sure that you run pod install for ios as well.

from react-native-slider.

strobox avatar strobox commented on May 28, 2024

run pod install
Yes, helped for me. Lot of thanks!

from react-native-slider.

hsiaotinghung avatar hsiaotinghung commented on May 28, 2024

I had the same issue and for me this was due to the fact that I had overridden the ReactPackages in MainApplication.getPackages(). I had to add new ReactSliderPackage(); (imported from com.reactnativecommunity.slider.ReactSliderPackage;) to the returned list to fix this.

I don't know the iOS variant for this but the idea is that you have to ensure your native code advertises all the native packages you need, including your dependencies. react-native link doesn't do that (and should probably warn about ?).

This works for me to fix the same issue when running on android simulator!

from react-native-slider.

willedanielsson avatar willedanielsson commented on May 28, 2024

I'm seeing the same issue. Invariant violation: requireNativeComponent: "RNCSlider" was not found in the UIManager. I've tried re-linking using react-native link and react-native link @react-native-community/slider. I've tried running a manual pod install in the ios folder. And I've also tried blowing out and resetting all node modules.

My instance of Slider is imported like this:
import Slider from "@react-native-community/slider";

react-native-cli: 2.0.1
react-native: 0.59.4
react-native-slider: 1.1.3

Anyone else still seeing this issue?

I think its due to your React Native being of version < 0.6 but your Slider is version > 2.0. Either upgrade your React Native version or downgrade Slider to 1.x.x

from react-native-slider.

gabrielslach avatar gabrielslach commented on May 28, 2024

In my case it didn't work after re-linking.
This fixed it

* `npm start -- --reset-cache`

* Followed by installed app deletion from emulator/device.

* Then `react-native run-<os>`

this worked for me

from react-native-slider.

partriv avatar partriv commented on May 28, 2024

had the same issue, running react-native link, and pod install helped me as well. The README should be updated.

run pod install
Yes, helped for me. Lot of thanks!

from react-native-slider.

ptaberg avatar ptaberg commented on May 28, 2024

I solved it with the next steps:

  • yarn add @react-native-community/[email protected]
  • react-native link
  • restart your project with react-native start --reset-cache
  • and command which has to be in you scripts rm -rf node-modules && yarn install && cd ios && rm Podfile.lock && pod install, and voila!

If you see this error again, so restart your server and just try to run one more time.

P.S. Remember, that default version of the component is 2, which supports react-native >0.60. If you have react-native <0.60, you need to install @react-native-community/[email protected].

from react-native-slider.

nikechanhk avatar nikechanhk commented on May 28, 2024

It is solved after running link.
I think it should be mentioned in the first page readme.

from react-native-slider.

jamesmcn1 avatar jamesmcn1 commented on May 28, 2024

This works for me on RN 0.59

yarn add @react-native-community/[email protected]
react-native link @react-native-community/slider
yarn add jetifier && yarn && npx jetify

yarn start --reset-cache #to reset the metro bundler

from react-native-slider.

 avatar commented on May 28, 2024

Just had the same issue after migrating to the community slider component. Apparently after adding the package in iOS you also need to run pod install.
So run the command pod install in ios folder after the package is added.

from react-native-slider.

sudokzt avatar sudokzt commented on May 28, 2024

FYR: I got same issue. I challenged all the above solutions. But I couldn't.
Then I found out why I couldn't.
I use RN on Expo. Expo is not corresponded this library. So I can use previous react-native-slider.
https://facebook.github.io/react-native/docs/slider

[expo issue] expo/expo#4300

from react-native-slider.

Ahmed-Badawy avatar Ahmed-Badawy commented on May 28, 2024

@ashish-padakannaya this worked, thanks man...

from react-native-slider.

ddilhan avatar ddilhan commented on May 28, 2024

Do it like this!

1- npm install @react-native-community/slider –save
2- react-native link @react-native-community/slider
3- include in your script file like import { Slider } from 'react-native' instead of import Slider from '@react-native-community/slider';

then expo start --clear

hopefully work for someone.

you saved my day bro

from react-native-slider.

Lemaro86 avatar Lemaro86 commented on May 28, 2024

Why you didn't write it in the readme? Just add rn link etc...
For RN 61 not working without manually linking for me.

from react-native-slider.

pachun avatar pachun commented on May 28, 2024
yarn add @react-native-community/slider
npx pod-install
npx react-native run-ios

Note the last line there. That's what I'd been missing. Rebuild your app after adding native dependencies.

from react-native-slider.

mstaicu avatar mstaicu commented on May 28, 2024

I think it's worth mentioning that one must build the app after linking the packages

from react-native-slider.

samdelong avatar samdelong commented on May 28, 2024

Restarting my Expo process worked for me (Using Expo 4.1.6)

from react-native-slider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.