Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native MacOS Error: "RNCSlider" was not found in the UIManager #511

Closed
keenan-v1 opened this issue May 25, 2023 · 3 comments
Closed
Labels
bug report Something isn't working

Comments

@keenan-v1
Copy link

Environment

  • react-native info output:
info Fetching system and libraries information...
System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M2
    Memory: 136.67 MB / 24.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.1.0 - /opt/homebrew/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 9.6.4 - /opt/homebrew/bin/npm
    Watchman: 2023.05.15.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /Users/jonathan/.rvm/rubies/ruby-3.0.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.9971841
    Xcode: 14.3/14E222b - /usr/bin/xcodebuild
  Languages:
    Java: 18.0.2.1 - /opt/homebrew/opt/openjdk/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.8 => 0.71.8
    react-native-macos: ^0.71.0-0 => 0.71.8
  npmGlobalPackages:
    *react-native*: Not Found
  • are you using the new architecture?
    Not sure, if that's Fabric then I believe that is the default in the latest versions.

  • which version of react & react-native are you using?
    React 18.2.0 & React Native 0.71.8

Description

When adding a <Slider> component to any page and running react-native run-macos results in the error below:

Screenshot of error

Screenshot 2023-05-24 at 19 50 24

Error Log from Metro

LOG  Running "RNCSliderDemo" with {"rootTag":1,"initialProps":{}}
ERROR  Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager.

This error is located at:
    in RNCSlider (at Slider.tsx:248)
    in SliderComponent (created by App)
    in RCTView (created by View)
    in View (created by App)
    in RCTScrollContentView (at ScrollView.js:1743)
    in RCTScrollView (created by ScrollView)
    in ScrollView (created by ScrollView)
    in ScrollView (created by App)
    in RCTView (created by View)
    in View (created by App)
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in RNCSliderDemo(RootComponent)
 ERROR  Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager.

This error is located at:
    in RNCSlider (at Slider.tsx:248)
    in SliderComponent (created by App)
    in RCTView (created by View)
    in View (created by App)
    in RCTScrollContentView (at ScrollView.js:1743)
    in RCTScrollView (created by ScrollView)
    in ScrollView (created by ScrollView)
    in ScrollView (created by App)
    in RCTView (created by View)
    in View (created by App)
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in RNCSliderDemo(RootComponent)

Reproducible Demo

I've created a repository that has reproduced this issue, though you must run it on a Mac for obvious reasons. https://github.com/keenan-v1/react-native-macos-rnc-slider-demo

The steps I took to create the repository:

  1. npx react-native init RNCSliderDemo --template react-native
  2. cd RNCSliderDemo
  3. yarn install (just in case!)
  4. yarn add @react-native-community/slider
  5. npx react-native-macos-init
  6. Modified App.tsx to have a slider.
  7. yarn react-native run-macos

Thank you.

@keenan-v1 keenan-v1 added the bug report Something isn't working label May 25, 2023
@keenan-v1
Copy link
Author

I saw #330 and do not feel this is a duplicate. I also can't find macOS called out in the documentation or listed in the package folder. Is there support for macOS, or is it easy to add support? I'm new to React Native and have been struggling with macOS support.

@BartoszKlonowski
Copy link
Member

Hello @keenan-v1!
Unfortunately, we don't yet support MacOS in Slider. I also can't give you any ETA of that as it's not yet planned.
For that, I recommend another packages that have their implementations based not on native side, but on pure react-native approach.

@keenan-v1
Copy link
Author

Thanks for the reply! I'll go ahead and close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants