react-native-context-menu-view icon indicating copy to clipboard operation
react-native-context-menu-view copied to clipboard

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

Open fernando-ropero-akimad opened this issue 2 years ago • 17 comments

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",

fernando-ropero-akimad avatar Mar 14 '23 02:03 fernando-ropero-akimad

Same issue with react-native 0.71.8

CavidM avatar Jun 06 '23 06:06 CavidM

same issue now it is 0.78

mimo-10 avatar Sep 17 '23 22:09 mimo-10

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

AlanHazel avatar Sep 18 '23 02:09 AlanHazel

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

williamlmao avatar Sep 29 '23 03:09 williamlmao

clearing the cache build doesn't help in expo

itemsCenter avatar Oct 17 '23 02:10 itemsCenter

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

mpiannucci avatar Nov 24 '23 18:11 mpiannucci

Can it be the android version?

PMVPYW avatar Dec 08 '23 08:12 PMVPYW

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

mpiannucci avatar Dec 08 '23 14:12 mpiannucci

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.

tiagodocusse avatar Dec 22 '23 13:12 tiagodocusse

@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"

nico-cohesion avatar Dec 28 '23 12:12 nico-cohesion

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

jayan2019 avatar Mar 05 '24 14:03 jayan2019

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.

arkabhowmik avatar Mar 13 '24 10:03 arkabhowmik