Picker has been removed from React Native. It can now be installed and imported from '@react-native-picker/picker after upgrading from react-native 0.65.1 to react-native 0.68.1
See original GitHub issueNew Version
0.68.1
Old Version
0.65.1
Build Target(s)
iOS 14 os 16
Output of react-native info
System: OS: macOS 12.6 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 1.14 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 14.5.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.5 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: API Levels: 23, 25, 26, 27, 28, 29, 30, 31 Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.2 System Images: android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7678000 Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild Languages: Java: 13.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: ^7.0.4 => 7.0.4 react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Issue and Reproduction Steps
Hey guys, I just updated my application from RN 0.65.1 to RN 0.68.1. Currently, when I’m running iOS the application is installed correctly and launched successfully e.g ( success Successfully launched the app on the simulator ) .
Once the Metro is loaded I do see this error :
ERROR Invariant Violation: Picker has been removed from React Native. It can now be installed and imported from ‘@react-native-picker/picker’ instead of ‘react-native’. See https://github.com/react-native-picker/picker
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
What bothers me is the first one e.g react-native-picker.
I do not use Picker in my code anywhere. I do not import it or export it.
Doest anyone faced that before?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Related StackOverflow Question
Hey guys, i resolved it by updating “react-native-globals”: “^0.60.3”, to 0.64.0. Globals is using Picker. You can close this and I hope my answer to help someone with the same issue.
Then I sadly can’t help you further. You’ll have to create a minimal reproducer that attempts to recreate this scenario.