Comments (50)
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.
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.
Do pod install
in your ios
folder and it works (for me).
from react-native-slider.
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.
You need to link and it works :
react-native link @react-native-community/slider
from react-native-slider.
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.
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.
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 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.
from react-native-slider.
@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.
I had the same issue and for me this was due to the fact that I had overridden the ReactPackage
s 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.
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.
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 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.
from react-native-slider.
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.
+1 I have the same error.
from react-native-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.
from react-native-slider.
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.
I got the same
from react-native-slider.
+1
from react-native-slider.
+1
from react-native-slider.
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.
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.
@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.
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.
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.
pod install
if you're using cocoapods in your project. Worked for me.
from react-native-slider.
Same error here
RNCSlider was not found in uimanager
"@react-native-community/slider": "^1.1.2",
from react-native-slider.
@muhammadwfa Did pod install
not do the trick for you?
from react-native-slider.
Actually this was not an issue
I solved by react-native-link
@bobber205
from react-native-slider.
How did you end up solving it? @muhammadwfa
from react-native-slider.
by linking
react-native link @react-native-community/slider
from react-native-slider.
Does this work without ejecting Expo?
from react-native-slider.
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.
Same. Not working.
from react-native-slider.
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.
run pod install
Yes, helped for me. Lot of thanks!
from react-native-slider.
I had the same issue and for me this was due to the fact that I had overridden the
ReactPackage
s 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 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.
I'm seeing the same issue.
Invariant violation: requireNativeComponent: "RNCSlider" was not found in the UIManager
. I've tried re-linking usingreact-native link
andreact-native link @react-native-community/slider
. I've tried running a manualpod install
in theios
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.
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.
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.
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.
It is solved after running link.
I think it should be mentioned in the first page readme.
from react-native-slider.
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.
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.
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.
@ashish-padakannaya this worked, thanks man...
from react-native-slider.
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 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
from react-native-slider.
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.
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.
I think it's worth mentioning that one must build the app after linking the packages
from react-native-slider.
Restarting my Expo process worked for me (Using Expo 4.1.6)
from react-native-slider.
Related Issues (20)
- How to use Tap in Android? HOT 2
- useState callback do not execute inside onSlidingComplete using tap. HOT 1
- Custom thumb image in Android becomes huge in contrary of iOS which is the the requested size HOT 2
- Clarification on `onValueChange` Behavior Across Platforms HOT 2
- lowerLimit for web HOT 1
- Wrong in Task :react-native-community_slider:compileReleaseJavaWithJavac FAILED
- Issue with Thumb Positioning in Web Implementation
- onValueChange triggers an extra time after onSlidingCompleted on Android HOT 2
- Android: StackOverflow when `lowerLimit` is greater than `upperLimit` (and, on some devices, when the slider first loads) HOT 3
- Customize Thumb component HOT 1
- update the targetSdk version
- StepMarker is not a prop at least on index.d.ts how to add a custom step marker? HOT 3
- trackStyle HOT 1
- trackStyle and thumbStyle HOT 2
- Callback for component `RNCSlider` HOT 4
- It doesn't work in portrait mode on maps component
- Android build failure - C++ errors, buildCMakeDebug HOT 5
- Unable to resolve module react-native/Libraries/NativeComponent/ViewConfigIgnore HOT 3
- how can i adjust the thickness of the slider HOT 1
- Secondary Progress / Buffered time HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-slider.