How to fix pointer event error ? React Native
Asked Answered
C

5

0

I've been getting this error in mac M1 laptop , meanwhile it is fine with my other device pointerEvents err

I've been stuck here and cant fix these error , please help Also there is this error "Requiring module "node_modules/@react-navigation/drawer/src/views/modern/Drawer.tsx" I don't even install drawer in other device and it is fine

Note also when I search globaly for <View pointerEvents='auto' ...> // pointerEvents , there is no such thing , since I never added that too to my view

Category answered 8/1, 2023 at 20:12 Comment(3)
try searching your node_modules folder for pointerEvents="auto" some code related to pressable has pointerEventChirlin
@MedetTleukabiluly weird thing is there is no pointerEvents anywhere or I've searched pointer-events there is none in any fileCategory
not much of a fix but you can downgrade @react-navigation/drawer to 5.12.9 until we get this figured outSharpshooter
P
2

i was facing the same issue , you can fix it in drawer version "6.1.4". please verify the version on yarn.lock

Pearcy answered 18/1, 2023 at 8:26 Comment(3)
how do you download the spesific version? with what command ? my version is 6.5.7Category
this might be the answer if I know how to change the version to 6.1.4Category
it should be "6.1.4" not "^6.1.4".Pearcy
C
1

The error is correct - pointerEvents is not a valid style property. It's a prop of View. Don't add it to your styles, set it directly on the View:

  <View pointerEvents='auto' ...>

See the docs for more on how to use pointerEvents. Auto is the default and doesn't need to be specified.

Circuity answered 8/1, 2023 at 20:31 Comment(6)
The thing is there is no <View pointerEvents='auto' ...> anywhere or when I searched global also there is no pointerEvents thingCategory
any other suggestion please ?Category
What are you trying to put the style on?Circuity
there is no style i've been putting in that correlated with pointerEvents or pointer-event, thats the weird part @CircuityCategory
hy did you fixed this issue?Boscage
no I still cant fix it @SaifUbaidCategory
W
1

I commented the pointerEvents: 'auto' from the @react-navigation library on this path ./node_modules/@react-navigation/drawer/src/views/modern/Overlay.tsx error went away. I have the latest version of lib installed.

Wagoner answered 19/1, 2023 at 9:3 Comment(0)
C
1

@react-navigation/drawer v6.5.7 still has same issue. I don't know which version is buggy. But for me, lowering down to v6.5.0 did the work.

Chickenlivered answered 27/1, 2023 at 7:20 Comment(0)
R
0

If you are using @react-navigation/drawer and getting this error, you can either update the @react-navigation/drawer version to the latest that is 7.0.0-alpha.1, or you create a patch to remove the pointer event from the style.

Go to the below location and find pressable style and remove the pointerEvents And add the pointerEvents to the overlay Animated.View

location: /node_modules/@react-navigation/drawer/src/views/modern/Overlay.tsx
Ribonuclease answered 25/5, 2023 at 5:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.