Reputation: 948
I am trying to run npm install react-native-gesture-handler
but my terminal gives me this error:
SAMETs-MBP:HelloWorld developer$ npm install react-native-gesture-handler
npm ERR! path /Users/developer/HelloWorld/node_modules/react-native-safe-area-view
npm ERR! code EISGIT
npm ERR! git /Users/developer/HelloWorld/node_modules/react-native-safe-area-view: Appears to be a git repo or submodule.
npm ERR! git /Users/developer/HelloWorld/node_modules/react-native-safe-area-view
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/developer/.npm/_logs/2019-05-14T05_27_08_555Z-debug.log
Can anyone help me on this? I searched online but couldn't find anything.
Upvotes: 0
Views: 2590
Reputation: 1519
running rm -rf node_modules/*/.git/
from root folder fixed my issue. reference https://github.com/react-native-community/react-native-safe-area-view/issues/73
Upvotes: 1
Reputation: 420
I faced the same issue today. Tried three steps and worked!
npm start -- --reset-cache
npm --save install react-native-gesture-handler
Update: I also found out deleting git folder inside the node_modules/react-native-safe-area-view
will fix this issue. Thanks @ThaJay
Hope it will help!
Upvotes: 4
Reputation: 1
Just delete the .git folder inside your_project_dir/node_modules/react-native-safe-area-view. And it worked for me.
Upvotes: 0
Reputation: 97
use yarn. using npm gave me an error. I tried with yarn, it didn't give any issue.
Upvotes: 1