Shopify / react-native-skia

High-performance React Native Graphics using Skia
https://shopify.github.io/react-native-skia
MIT License
6.82k stars 439 forks source link

'RNSkiaModule' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes #2009

Closed dbenader closed 9 months ago

dbenader commented 9 months ago

Description

I'm developing via expo. As soon as I upgraded to 0.1.222 of skia, I started to get this error: _**ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNSkiaModule' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes ERROR Invariant Violation: "main" has not been registered. This can happen if:

Simulator Screen Shot - iPhone 13 - 2023-11-26 at 18 37 58

Simulator Screen Shot - iPhone 13 - 2023-11-26 at 18 37 53

Version

0.1.222

Steps to reproduce

{ "name": "hamock-mobile", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject", "ts:check": "tsc" }, "dependencies": { "@expo-google-fonts/inter": "^0.2.3", "@expo-google-fonts/montserrat": "^0.2.3", "@expo-google-fonts/open-sans": "^0.2.3", "@expo-google-fonts/quicksand": "^0.2.2", "@expo-google-fonts/roboto": "^0.2.2", "@expo-google-fonts/roboto-condensed": "^0.2.2", "@expo-google-fonts/roboto-mono": "^0.2.3", "@expo/vector-icons": "^13.0.0", "@gorhom/bottom-sheet": "^4", "@react-native-async-storage/async-storage": "1.18.2", "@react-native-community/datetimepicker": "7.2.0", "@react-native-community/netinfo": "9.3.10", "@react-native-picker/picker": "2.4.10", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/native": "^6.0.13", "@react-navigation/native-stack": "^6.9.1", "@react-navigation/stack": "^6.3.16", "@shopify/react-native-skia": "^0.1.222", "@types/react": "~18.0.27", "amazon-cognito-identity-js": "^6.2.0", "aws-amplify": "^5.2.0", "axios": "^1.3.1", "d3": "^7.6.1", "expo": "^49.0.13", "expo-app-loading": "~2.1.0", "expo-av": "~13.4.1", "expo-blur": "~12.4.1", "expo-font": "~11.4.0", "expo-haptics": "~12.4.0", "expo-location": "~16.1.0", "expo-secure-store": "~12.3.1", "expo-status-bar": "~1.6.0", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.72.5", "react-native-chart-kit": "^6.12.0", "react-native-date-picker": "^4.3.3", "react-native-gesture-handler": "~2.12.0", "react-native-maps": "1.7.1", "react-native-radio-buttons-group": "^3.0.2", "react-native-reanimated": "~3.3.0", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-svg": "13.9.0", "react-native-toast-message": "^2.1.6", "react-native-uuid": "^2.0.1", "react-native-web": "~0.19.6" }, "devDependencies": { "@babel/core": "^7.18.6", "@tsconfig/react-native": "^2.0.2", "@types/d3": "^7.4.3", "@types/jest": "^29.2.3", "@types/react": "~18.2.14", "@types/react-test-renderer": "^18.0.0", "react-devtools": "^4.28.0", "typescript": "^5.1.3" }, "private": true }

Snack, code example, screenshot, or link to a repository

{ "name": "hamock-mobile", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject", "ts:check": "tsc" }, "dependencies": { "@expo-google-fonts/inter": "^0.2.3", "@expo-google-fonts/montserrat": "^0.2.3", "@expo-google-fonts/open-sans": "^0.2.3", "@expo-google-fonts/quicksand": "^0.2.2", "@expo-google-fonts/roboto": "^0.2.2", "@expo-google-fonts/roboto-condensed": "^0.2.2", "@expo-google-fonts/roboto-mono": "^0.2.3", "@expo/vector-icons": "^13.0.0", "@gorhom/bottom-sheet": "^4", "@react-native-async-storage/async-storage": "1.18.2", "@react-native-community/datetimepicker": "7.2.0", "@react-native-community/netinfo": "9.3.10", "@react-native-picker/picker": "2.4.10", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/native": "^6.0.13", "@react-navigation/native-stack": "^6.9.1", "@react-navigation/stack": "^6.3.16", "@shopify/react-native-skia": "^0.1.222", "@types/react": "~18.0.27", "amazon-cognito-identity-js": "^6.2.0", "aws-amplify": "^5.2.0", "axios": "^1.3.1", "d3": "^7.6.1", "expo": "^49.0.13", "expo-app-loading": "~2.1.0", "expo-av": "~13.4.1", "expo-blur": "~12.4.1", "expo-font": "~11.4.0", "expo-haptics": "~12.4.0", "expo-location": "~16.1.0", "expo-secure-store": "~12.3.1", "expo-status-bar": "~1.6.0", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.72.5", "react-native-chart-kit": "^6.12.0", "react-native-date-picker": "^4.3.3", "react-native-gesture-handler": "~2.12.0", "react-native-maps": "1.7.1", "react-native-radio-buttons-group": "^3.0.2", "react-native-reanimated": "~3.3.0", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-svg": "13.9.0", "react-native-toast-message": "^2.1.6", "react-native-uuid": "^2.0.1", "react-native-web": "~0.19.6" }, "devDependencies": { "@babel/core": "^7.18.6", "@tsconfig/react-native": "^2.0.2", "@types/d3": "^7.4.3", "@types/jest": "^29.2.3", "@types/react": "~18.2.14", "@types/react-test-renderer": "^18.0.0", "react-devtools": "^4.28.0", "typescript": "^5.1.3" }, "private": true }

CoreyBovalina commented 9 months ago

There's a good chance that expo hasn't updated their libraries to support this new version in expo go

hadnet commented 9 months ago

@CoreyBovalina Got the same error and I'm not using Expo.

wcandillon commented 9 months ago

Indeed this version is not supported with expo sdk 49. @hadnet If you have a small reproduction, let us know.

hadnet commented 9 months ago

Indeed this version is not supported with expo sdk 49.

@hadnet If you have a small reproduction, let us know.

Solved. It was an issue with another library, nothing to do with Skia. Thank you.

geforcefan commented 9 months ago

@hadnet Have similar problems, what was the cause?

hadnet commented 9 months ago

@hadnet Have similar problems, what was the cause?

The Rive library was blocking running the pod install command.

dmkav commented 9 months ago

@wcandillon, I encountered the same issue using a brand-new expo project. I wanted to test skia out. I used "@shopify/react-native-skia": "0.1.229" version with "expo": "~49.0.21", as well as with downgraded versions 46, 47. The problem remains the same. Any idea I can launch it with Expo?

AjaySingh470 commented 8 months ago

@hadnet how did you resolved issue with Rive library ??

Lyesbcb commented 8 months ago

Hey ! Same error here with new project with this:

{
  "name": "my-app",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "expo": "~49.0.15",
    "expo-status-bar": "~1.6.0",
    "react": "18.2.0",
    "react-native": "0.72.6",
    "react-native-svg": "^14.1.0",
    "victory-native": "^40.0.3",
    "expo-splash-screen": "~0.20.5"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}
iliasloure7 commented 7 months ago

@hadnet how did you resolve the issue;

mohamine18 commented 6 months ago

Some dependencies are incompatible with the installed expo version

Solution: npx expo install --fix

Doing that will let expo upgrade or downgrade the version of each package for compatibility purpose

iliasloure7 commented 6 months ago

@mohamine18 any solutions with non expo project;

kibecodes commented 4 months ago

Solution: 'npx expo install --fix' should work if you have packages that don't work with node v17+ or higher Otherwise you can handle the packages manually if you wanna maintain your node v

Gnoot01 commented 2 months ago

Hi, having this issue without expo and the following repos, please help!

{ "name": "my-app", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest" }, "dependencies": { "react": "18.2.0", "react-native": "0.72.4", "react-native-fast-tflite": "^1.2.0", "react-native-reanimated": "^3.12.1", "react-native-vision-camera": "^4.0.3", "react-native-worklets-core": "^1.3.0", "vision-camera-resize-plugin": "^3.1.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "^0.74.81", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.11", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.8", "prettier": "^2.4.1", "react-test-renderer": "18.2.0", "typescript": "4.8.4" }, "engines": { "node": ">=16" } }

manishsharma64 commented 3 weeks ago

FYI - I was able to resolve this issue by building apk on EAS using eas build --profile development command. Download and install apk on device. And using installed apk for further development.

TheUnconstrainedMind commented 1 week ago

Still relevant issue, has anyone fixed it?