callstack / react-native-slider

React Native component exposing Slider from iOS and SeekBar from Android
MIT License
1.22k stars 271 forks source link

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

Closed gwonsuji closed 1 year ago

gwonsuji commented 1 year ago

Environment

Description

Upgrading existing react native cli project. I am upgrading the reaction native version to 0.68.6 -> 0.70.8. I was warned to change to @react-native-community/slider because react-native no longer supports sliders after the version up. So I changed it, but I received the same error as above.

I wondered if it was a problem because I called from multiple screens, but the same problem occurs when I just call the slider in the App.js file. The bigger problem is that after you create a new project, the slider works and you don't know what the problem is. If necessary, I will compress and upload my node_modules.

This is my package.json

"dependencies": {
    "@expo/config-plugins": "^5.0.2",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/cli-debugger-ui": "^11.3.6",
    "@react-native-community/slider": "4.3.2",
    "@react-native-community/toolbar-android": "0.2.1",
    "@react-native-masked-view/masked-view": "0.2.8",
    "@react-native-picker/picker": "2.4.8",
    "@react-native-seoul/kakao-login": "4.2.3",
    "@react-native-voice/voice": "3.2.4",
    "@react-navigation/bottom-tabs": "6.5.7",
    "@react-navigation/drawer": "6.4.4",
    "@react-navigation/elements": "1.3.18",
    "@react-navigation/material-top-tabs": "6.6.1",
    "@react-navigation/native": "6.1.7",
    "@react-navigation/stack": "6.3.16",
    "@rneui/base": "^4.0.0-rc.7",
    "@rneui/themed": "^4.0.0-rc.7",
    "@tensorflow/tfjs": "3.16.0",
    "@tensorflow/tfjs-react-native": "0.8.0",
    "axios": "0.27.2",
    "buffer": "6.0.3",
    "create-react-context": "0.2.3",
    "deprecated-react-native-prop-types": "4.2.0",
    "diff": "5.0.0",
    "expo": "^47.0.0",
    "expo-asset": "8.7.0",
    "expo-camera": "13.1.0",
    "expo-file-system": "15.1.1",
    "expo-gl": "12.0.1",
    "expo-gl-cpp": "11.4.0",
    "expo-modules-autolinking": "1.0.0",
    "expo-modules-core": "1.1.1",
    "install-expo-modules": "0.5.2",
    "lottie-ios": "3.4.1",
    "lottie-react-native": "5.1.4",
    "moment": "2.29.1",
    "patch-package": "^7.0.0",
    "postinstall-postinstall": "^2.1.0",
    "qs": "6.9.4",
    "react": "18.1.0",
    "react-native": "^0.70.8",
    "react-native-audio-record": "0.2.2",
    "react-native-code-push": "7.0.4",
    "react-native-drax": "0.10.3",
    "react-native-easy-dnd": "1.0.2",
    "react-native-elements": "2.3.2",
    "react-native-flip-card": "3.5.6",
    "react-native-fs": "2.18.0",
    "react-native-gesture-handler": "2.2.1",
    "react-native-image-picker": "4.0.6",
    "react-native-image-resizer": "1.4.5",
    "react-native-indicators": "0.17.0",
    "react-native-linear-gradient": "2.5.6",
    "react-native-material-ripple": "0.9.1",
    "react-native-material-tabs": "4.2.0",
    "react-native-modal": "13.0.1",
    "react-native-nfc-manager": "3.14.5",
    "react-native-orientation-locker": "1.5.0",
    "react-native-pager-view": "6.0.1",
    "react-native-picker-select": "8.0.4",
    "react-native-reanimated": "2.10.0",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "3.13.1",
    "react-native-snap-carousel": "4.0.0-beta.6",
    "react-native-sound": "0.11.2",
    "react-native-sound-player": "0.13.2",
    "react-native-splash-screen": "3.3.0",
    "react-native-svg": "12.3.0",
    "react-native-tab-view": "3.5.1",
    "react-native-toast-message": "1.6.0",
    "react-native-tts": "4.1.0",
    "react-native-vector-icons": "9.2.0",
    "react-native-webview": "11.18.1",
    "react-native-youtube": "2.0.2",
    "shuffle-array": "1.0.1",
    "styled-components": "5.3.10"
  },
  "devDependencies": {
    "@babel/core": "7.22.9",
    "@babel/helper-create-regexp-features-plugin": "7.22.9",
    "@babel/helper-define-polyfill-provider": "0.4.1",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "eslint-plugin-react": "7.32.2",
    "jest": "^26.6.3",
    "jetifier": "^2.0.0",
    "metro-react-native-babel-preset": "0.72.3",
    "react-test-renderer": "18.1.0"
  },
  "jest": {
    "preset": "react-native"
  }
BartoszKlonowski commented 1 year ago

Hello @gwonsuji! Thanks for taking the time to report it. This issue has already been reported in #330, so let me close this one as a duplicate.

gwonsuji commented 1 year ago

@BartoszKlonowski I'm not using tvos, and the version and environment are different from the problem you mentioned. Nevertheless, it's disappointing to end like this without properly checking and supporting just because it's the same error phrase. None of the writing on the issue you mentioned was helpful to me. I wasted a week on this issue and nevertheless the issue didn't work out, so I asked here a question. But is it right to close the problem without giving proper help just because the phrase of the error is the same? I want proper help, not a manual response.

BartoszKlonowski commented 1 year ago

Hello @gwonsuji! Sorry for misunderstanding. Thing is, that in the issue I linked is a place for me to keep all those errors in one place so I can easier keep track on all of them. Note that after I linked your issue I also added new label noticing it indeed does affect different environment than the original issue just like you said, so please do not worry. edit: And also please see that other folks also post theirs "+1"s in the original issue even when explicitly saying their "+1"s are also for other platforms, just like your, which be sure I will keep in mind./edit Also, the fact that I closed the issue you created in favor of having it in the first reported for such error doesn't mean your issue will not be worked on, do not worry about it 👍 When having all of them linked in the "original one" I can still see all of them even when they are closed and I will cover all of them when I get to this issue regardless of their state or platform. Let me know if explanation of my approach covered your concerns.

gwonsuji commented 1 year ago

@BartoszKlonowski Oh, I'm sorry I misunderstood. I just thought I was closing my problem and no more support. I'll be waiting.

colindaly commented 8 months ago

I battled this for a long time. I fixed it by running... rm -rf ios/build // this deletes the iOS build cache npm start --reset-cache // this runs the metro server and rebuilds the iOS app

hsk-kr commented 3 months ago

I reinstalled dependencies several times (delete node_modules, pods, build and install node packages, pods and build in XCode), and you know. there's a status bar in XCode. I think I may've tried to build while it's doing something, which isn't noticiable, and I put a couple hours into it and it works now.