← All fixes
Invariant Violation: requireNativeComponent: "X" was not found in the UIManager
#177Error
Invariant Violation: requireNativeComponent: "RNSScreen" was not found in the UIManager.
Why it happens, and why this works
The JavaScript side of a library with native code is installed, but the app binary running on the device doesn't include its native part. Expo Go only contains the native modules it ships with, and a dev build or bare app needs rebuilding after adding a native library.
Fix
1. Expo: if the library isn't supported in Expo Go, create a development build: npx expo run:ios / npx expo run:android, or eas build --profile development. 2. After installing any native library, rebuild the app; a JS reload isn't enough. 3. Bare iOS: cd ios && pod install, then rebuild. 4. Check for two versions of the library (npm ls react-native-screens) and dedupe.
Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
npm publish of a new package fails with 404 Not Found on PUT, then 403 two-factor required
#21npm publish fails: 404 Not Found - PUT https://registry.npmjs.org/<package> - Not found. "could not be found or you do not have permission to access it" (first publish of a new package). After logging in again: 403 Forbidden - Two-factor authentication or granular access token with bypass 2fa enabled is required to publish packages.
bash: tsc: command not found (tool is installed in node_modules, not globally)
#64build.sh: line 1: tsc: command not found
nodenpmtypescriptVerifiedNo reports yet
node --env-file: .env: not found
#62node: .env: not found