react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

[Reanimated] Babel plugin exception: TypeError: (0 , types_12.cloneNode) is not a function

Open ChristopherGabba opened this issue 1 year ago • 12 comments

Description

I am trying to compile my expo-51 (managed workflow) app and I am getting the error

" node_modules/react-native-gesture-handler/src/handlers/gestures/hoverGesture.ts: /Users/christophergabba/Documents/ReelFeelApp/node_modules/react-native-gesture-handler/src/handlers/gestures/hoverGesture.ts: [Reanimated] Babel plugin exception: TypeError: (0 , types_12.cloneNode) is not a function"

Steps to reproduce

  1. Use the react-native-ignite boilerplate
  2. Choose NPM instead of yarn
  3. Upgrade the project to Expo-51
  4. Compile a Development Build for iOS

I solved the problem by installing all the dependencies with yarn. As soon as I use npm to install everything, it throws this error.

Snack or a link to a repository

Working on it now

Reanimated version

3.10.1

React Native version

0.74.1

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo Dev Client

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

Real device

Device model

iPhone 12

Acknowledgements

Yes

ChristopherGabba avatar May 11 '24 20:05 ChristopherGabba

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] avatar May 11 '24 20:05 github-actions[bot]

I am also encountering the same issue when running the dev client on iOS. I have the same specs as mentioned above, and react native version 0.74.1. This is the full error message I receive:

error: node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: /Users/adityaarchunananand/Hatch/Frontend/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: [Reanimated] Babel plugin exception: TypeError: (0 , types_12.cloneNode) is not a function

AdityaAA2004 avatar Jun 16 '24 17:06 AdityaAA2004

@AdityaAA2004 It works when I run it yarn and have a yarn.lock file, but not when I use npm.

ChristopherGabba avatar Jun 16 '24 20:06 ChristopherGabba

Ok, so, does the App build on the expo dev client without this error when we use the yarn package manager?

AdityaAA2004 avatar Jun 16 '24 20:06 AdityaAA2004

@AdityaAA2004 Yes it does for me. I cannot use NPM in my project until this issue is resolved.

ChristopherGabba avatar Jun 17 '24 12:06 ChristopherGabba

any update on this? running into the same issue.

leon-xd avatar Jul 22 '24 15:07 leon-xd

@AdityaAA2004

leon-xd avatar Jul 23 '24 14:07 leon-xd

I just try restarting the app, or delete it from the simulator and re-install all dependencies. Or, I re-create the development build again. I am not able to get a permanent fix.

AdityaAA2004 avatar Jul 23 '24 15:07 AdityaAA2004

using yarn solved a similar issue for me -> node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: (0 , types_1.cloneNode) is not a function

fruitybits avatar Jul 23 '24 23:07 fruitybits

Having the same problem building Android Expo

almeidapaulooliveira avatar Jul 31 '24 14:07 almeidapaulooliveira

Any solution? Also encounter this issue.

sunboykenneth avatar Sep 25 '24 07:09 sunboykenneth

Same here!

pridapablo avatar Sep 30 '24 20:09 pridapablo

same here!

shlomiro avatar Oct 29 '24 15:10 shlomiro