I already installed it and import it but this error shows
"Native Component for "RNCSlider" does not exist."
I got the same
+1 I have the same error.
+1
+1
You need to link and it works :
react-native link @react-native-community/slider
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.
I don't think this should be closed - this did not fix it for me, I am still getting the same error
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?
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?
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.
Do pod install in your ios folder and it works (for me).
@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.
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.
pod install fixed it for me as well -- I was under the assumption that the react native link did it as well? :P
pod install if you're using cocoapods in your project. Worked for me.
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.
Same error here
RNCSlider was not found in uimanager
"@react-native-community/slider": "^1.1.2",
@muhammadwfa Did pod install not do the trick for you?
Actually this was not an issue
I solved by react-native-link
@bobber205
How did you end up solving it? @muhammadwfa
by linking
react-native link @react-native-community/slider
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 ?).
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?
In my case it didn't work after re-linking.
This fixed it
npm start -- --reset-cachereact-native run-<os>Does this work without ejecting Expo?
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.
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 ...
Same. Not working.
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.
run pod install
Yes, helped for me. Lot of thanks!
I had the same issue and for me this was due to the fact that I had overridden the
ReactPackages inMainApplication.getPackages(). I had to addnew ReactSliderPackage();(imported fromcom.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 linkdoesn't do that (and should probably warn about ?).
This works for me to fix the same issue when running on android simulator!
I'm seeing the same issue.
Invariant violation: requireNativeComponent: "RNCSlider" was not found in the UIManager. I've tried re-linking usingreact-native linkandreact-native link @react-native-community/slider. I've tried running a manualpod installin theiosfolder. 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.3Anyone 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
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
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!
I solved it with the next steps:
yarn add @react-native-community/[email protected]react-native start --reset-cacherm -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]._
It is solved after running link.
I think it should be mentioned in the first page readme.
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
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.
Do it like this!
1- npm install @react-native-community/slider 鈥搒ave
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.
Do it like this!
1-
npm install @react-native-community/slider 鈥搒ave
2-react-native link @react-native-community/slider
3- include in your script file likeimport { Slider } from 'react-native'instead ofimport Slider from '@react-native-community/slider';then expo start --clear
hopefully work for someone.
This worked for me.
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] https://github.com/expo/expo/issues/4300
Do it like this!
1-
npm install @react-native-community/slider 鈥搒ave
2-react-native link @react-native-community/slider
3- include in your script file likeimport { Slider } from 'react-native'instead ofimport Slider from '@react-native-community/slider';then expo start --clear
hopefully work for someone.
Please accept my knees.
@ashish-padakannaya this worked, thanks man...
Do it like this!
1-
npm install @react-native-community/slider 鈥搒ave
2-react-native link @react-native-community/slider
3- include in your script file likeimport { Slider } from 'react-native'instead ofimport Slider from '@react-native-community/slider';then expo start --clear
hopefully work for someone.
you saved my day bro
@techtunix Whats the point of adding and linking the @react-native-community/slider at all if you use the deprecated one from react-native?
Why you didn't write it in the readme? Just add rn link etc...
For RN 61 not working without manually linking for me.
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.
I think it's worth mentioning that _one must build the app_ _after_ linking the packages
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!
Restarting my Expo process worked for me (Using Expo 4.1.6)
Most helpful comment
I don't think this should be closed - this did not fix it for me, I am still getting the same error