mpiannucci / react-native-context-menu-view

Use native context menus in React Native
MIT License
652 stars 66 forks source link

Invariant Violation: requireNativeComponent: "ContextMenu" was not found in the UIManager. #77

Open fernando-ropero-akimad opened 1 year ago

fernando-ropero-akimad commented 1 year ago

When using this component I encounter the following error:

Captura de pantalla 2023-03-13 a la(s) 21 16 16

ios works fine but android gives error.

I've tried:

Restarting computer Re-adding and re installing with yarn (I don't use npm) A bunch of stuff with pods I can't even remember

"react-native-context-menu-view": "^1.9.1" "react-native": "0.69.7",

CavidM commented 1 year ago

Same issue with react-native 0.71.8

mimo-10 commented 1 year ago

same issue now it is 0.78

AlanHazel commented 1 year ago

For Expo users: I was able to solve this by simply rebuilding in Expo.

williamlmao commented 11 months ago

Same issue - @AlanHazel how did you rebuild expo? expo start with the --clear flag?

itemsCenter commented 11 months ago

clearing the cache build doesn't help in expo

mpiannucci commented 9 months ago

I updated the example app to the latest react native and built fresh and I am not seeing the error unfortunately

PMVPYW commented 9 months ago

Can it be the android version?

mpiannucci commented 9 months ago

I had this issue at one point on android, and running the following cleared it up:

rm -rf node_modules
cd android
./gradlew clean
cd ../
yarn install
react-native run-android --reset-cache
tiagodocusse commented 9 months ago

Same problem with Expo here. My versions: This lib is 1.14.1, Expo v. 49.0.21, React Native v. 0.72.6.

Tried cleaning Expo cache, expo install --check, start with npx expo start --clear, nothing worked. I get the same error both in Android and iOS.

nico-cohesion commented 8 months ago

@mpiannucci please have a look, I am also getting the same issue.

"expo": "~49.0.21" "react": "18.2.0" "react-native": "0.72.6" "react-native-context-menu-view": "^1.14.1"

jayan2019 commented 6 months ago

I also faced this issue in expo and when i run with development build, i can able to use the component without any error. If anyone facing same issue refer this expo documentation

arkabhowmik commented 6 months ago

For those who are still facing the error on expo, you need to -

  1. Install this library using npm install react-native-context-menu-view --save.
  2. Run eas build --profile development to create a new development build.
nico-cohesion commented 3 months ago

Also an issue in: "expo": "51.0.8" "react-native": "0.74.1" "react-native-context-menu-view": "^1.16.0"

stefan-stankovic commented 2 months ago

Has anyone fixed this?

willashley23 commented 4 days ago

Bump. Running into the same issue still. I created a development build, and can get it to run in the simulator using npx expo run:ios, but it doesn't work inside Expo Go. Would really appreciate some help here, it looked really nice in the simulator!

mpiannucci commented 4 days ago

I don't think it will ever work in expo go. You need to install the dev build on an actual device

willashley23 commented 2 days ago

Yeah, I realized Expo Go can't render some native components so things like this will only ever work in a dev build.