barmej / react-native-youtube-player

A Cross-platform Youtube Player component for React Native Built using the official YouTube IFrame Player API.
128 stars 49 forks source link

requireNativeComponent: "RNCWebView" was not found in the UIManager - android #24

Closed federicoparroni closed 4 years ago

federicoparroni commented 4 years ago

I'm getting this error when I start the app on Android (I'm using Yarn as package manager): image

I did not link anything, since I'm using RN 0.62.

package.json:

{
  "name": "mobile",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "npx react-native run-android",
    "ios": "npx react-native run-ios",
    "test": "jest",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
  },
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.7",
    "@react-navigation/bottom-tabs": "^5.2.5",
    "@react-navigation/native": "^5.1.3",
    "@react-navigation/stack": "^5.2.6",
    "axios": "^0.19.2",
    "react": "16.9.0",
    "react-native": "0.62",
    "react-native-elements": "^1.2.7",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-orientation": "^3.1.3",
    "react-native-reanimated": "^1.7.1",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^2.4.0",
    "react-native-vector-icons": "^6.6.0",
    "react-native-webview-invoke": "^0.5.1",
    "react-native-yt-player": "^1.0.6",
    "react-redux": "^7.2.0",
    "redux": "^4.0.5",
    "redux-axios-middleware": "^4.0.1",
    "redux-thunk": "^2.3.0",
    "symbol-observable": "^1.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^0.0.5",
    "@types/hoist-non-react-statics": "^3.3.1",
    "@types/jest": "^24.0.24",
    "@types/react-native": "^0.60.25",
    "@types/react-redux": "^7.1.7",
    "@types/react-test-renderer": "16.9.1",
    "@typescript-eslint/eslint-plugin": "^2.12.0",
    "@typescript-eslint/parser": "^2.12.0",
    "babel-jest": "^24.9.0",
    "eslint": "^6.5.1",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.56.0",
    "react-test-renderer": "16.9.0",
    "redux-devtools-extension": "^2.13.8",
    "redux-logger": "^3.0.6",
    "typescript": "^3.7.3"
  },
  "workspaces": {
    "nohoist": [
      "react",
      "react/**",
      "react-native",
      "react-native/**",
      "@babel",
      "@babel/**",
      "@react-native-community",
      "@react-native-community/**",
      "redux",
      "redux/**",
      "react-redux",
      "react-redux/**",
      "symbol-observable",
      "react-native-linear-gradient",
      "react-native-gesture-handler",
      "@react-navigation",
      "@react-navigation/**",
      "redux-thunk",
      "axios",
      "react-native-keyboard-aware-scroll-view",
      "redux-logger",
      "react-native-elements",
      "react-native-elements/**",
      "react-native-vector-icons",
      "react-native-vector-icons/**",
      "react-native-reanimated",
      "react-native-reanimated/**",
      "react-native-webview",
      "react-native-webview/**",
      "react-native-webview-invoke",
      "react-native-webview-invoke/**",
      "react-native-orientation",
      "react-native-orientation/**"
    ]
  },
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
}
vanthang91 commented 4 years ago

+1

federicoparroni commented 4 years ago

I don't know if it's the right solution, but the error stopped after I installed react-native-webview as a depencency and then run: npx react-native link react-native-webview

yjose commented 4 years ago

The problem is related to react-native-webview link. you should link react-native-webview if you are using react-native under 0.60

federicoparroni commented 4 years ago

I am using react-native 0.62

yjose commented 4 years ago

Yesterday i updated the example app to rn 0.62 and it's working as expected