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

ERROR: Invariant Violation: requireNativeComponent: "CKCameraManager" was not found in the UIManager. #2

Open
ghost opened this issue Mar 25, 2024 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 25, 2024

I'm trying to use the plugin to be able to use the react native camera kit at the expo, I did everything step by step, but when I initialize the camera component it returns this error: Invariant Violation: requireNativeComponent: "CKCameraManager" was not found in the UIManager.

I will make my settings available here:

package.json:

{
  "name": "teste-tailwind",
  "version": "1.0.6",
  "main": "expo-router/entry",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "expo": "~50.0.13",
    "expo-constants": "~15.4.2",
    "expo-linking": "~6.2.1",
    "expo-react-native-camera-kit": "^0.2.0",
    "expo-router": "~3.4.8",
    "expo-splash-screen": "~0.26.1",
    "expo-status-bar": "~1.11.1",
    "expo-updates": "~0.24.12",
    "nativewind": "^4.0.1",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.73.4",
    "react-native-button": "^3.1.0",
    "react-native-camera-kit": "^13.0.0",
    "react-native-reanimated": "~3.6.0",
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "~3.29.0",
    "react-native-web": "~0.19.6",
    "tailwindcss": "^3.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react": "~18.2.45",
    "@types/react-native-button": "^3.0.5",
    "typescript": "^5.3.0"
  },
  "private": true
}

app.json:

{
  "expo": {
    "scheme": "acme",
    "version": "1.0.0",
    "userInterfaceStyle": "automatic",
    "orientation": "default",
    "web": {
      "output": "static",
      "bundler": "metro"
    },
    "plugins": [
      [
        "expo-router",
        {
          "origin": "https://n"
        }
      ],
      [
        "expo-react-native-camera-kit",
        {
          "minSdkVersion": 23
        }
      ]
    ],
    "name": "teste-tailwind",
    "slug": "teste-tailwind",
    "extra": {
      "router": {
        "origin": "https://n"
      }
    },
    "runtimeVersion": {
      "policy": "appVersion"
    }
  }
}

index.tsx:

import React from "react";
import { View } from "react-native";
import { Camera, CameraType } from "react-native-camera-kit";

export default function Page() {
  return (
    <View className="flex flex-1">
      <Camera
        cameraType={CameraType.Back} // front/back(default)
        flashMode="auto"
      />
    </View>
  );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants