Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

npm ERR! code EISGIT, Appears to be a git repo or submodule #73

Closed
fredrik-jarnbrost opened this issue May 16, 2019 · 38 comments
Closed

Comments

@fredrik-jarnbrost
Copy link

fredrik-jarnbrost commented May 16, 2019

I get this when I do npm install. I'm happy to provide more info if needed.

npm ERR! code EISGIT
npm ERR! git /Users/fredrikve/Stagecast/goteborgsvarvapp/node_modules/react-native-safe-area-view: Appears to be a git repo or submodule.
npm ERR! git     /Users/fredrikve/Stagecast/goteborgsvarvapp/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.

EDIT: this happens on a fresh npm install

@a379351939
Copy link

same as you

@Irislm
Copy link

Irislm commented May 16, 2019

Try it rm -rf node_modules/*/.git/. It works for me!

@jqn
Copy link

jqn commented May 16, 2019

Thanks @Irislm I ran the command and it fixed the issue. I'm still wondering what caused the issue on the first place.

@fredrik-jarnbrost
Copy link
Author

@Irislm Thanks for the work-around. I edited the issue to specify when this happens

@pcowgill
Copy link

@fredrik-jarnbrost @a379351939 @Irislm @jqn FYI it's fixed in this commit 1f8d389

See this comment in another issue #69 (comment)

@fredrik-jarnbrost
Copy link
Author

Oh didn't find that issue when I searched, sorry. Thanks for the quick help!

Closing this, duplicate of #69

@shahidx-iqbal
Copy link

Thanks @Irislm I ran the command and it fixed the issue. I'm still wondering what caused the issue on the first place.

where to run??

@jqn
Copy link

jqn commented May 20, 2019

@shadyo7 run it in the root of your project where the node_modules directory is located

@saeedhemmati
Copy link

Also me!

@drpiou
Copy link

drpiou commented Jun 18, 2019

it breaks my project

@laptran-sym
Copy link

Try it rm -rf node_modules/*/.git/. It works for me!

Thanks it work for me

@LeRoyJulian
Copy link

If you have this problem with Homebrew : rm -rf /usr/local/lib/node_modules/*/.git/ then update again.

@malikkurosaki
Copy link

If you have this problem with Homebrew : rm -rf /usr/local/lib/node_modules/*/.git/ then update again.

good job , this worked for me

@shahidx-iqbal
Copy link

shahidx-iqbal commented Jul 8, 2019

@shadyo7 run it in the root of your project where the node_modules directory is located
i run it in root files but get this

'rm' is not recognized as an internal or external command,
operable program or batch file.
jqn

@Phuonglv123
Copy link

@shadyo7 run it in the root of your project where the node_modules directory is located
i run it in root files but get this

'rm' is not recognized as an internal or external command,
operable program or batch file.
jqn

delete node_modules and then npm install

@graniczny
Copy link

Hi!
I've got the same problem with @tensorflow/tfjs package.
When I install it locally everything works, problem appears when I deploy it on CircleCi -> Google Kubernetess.

I get this err:
npm ERR! path /root/repo/node_modules/@tensorflow/tfjs-converter
npm ERR! code EISGIT
npm ERR! git /root/repo/node_modules/@tensorflow/tfjs-converter: Appears to be a git repo or submodule.
npm ERR! git /root/repo/node_modules/@tensorflow/tfjs-converter
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

any ideas?

@cnebs
Copy link

cnebs commented Aug 5, 2019

Hi!
I've got the same problem with @tensorflow/tfjs package.
When I install it locally everything works, problem appears when I deploy it on CircleCi -> Google Kubernetess.

I get this err:
npm ERR! path /root/repo/node_modules/@tensorflow/tfjs-converter
npm ERR! code EISGIT
npm ERR! git /root/repo/node_modules/@tensorflow/tfjs-converter: Appears to be a git repo or submodule.
npm ERR! git /root/repo/node_modules/@tensorflow/tfjs-converter
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

any ideas?

I'm having this problem too. Have you tried manually removing its .git and seeing if your app still works?

@rmsparajuli
Copy link

this isn't best way but it works.

remove package-lock.json
and then npm install

@manjunath1998
Copy link

rm -rf node_modules/*/.git/
this is a command right

@Atomo87
Copy link

Atomo87 commented Sep 20, 2019

Manually delete the seen react-native-safe-area module, and then run npm.
This will update the module. This happens when there is a mismatch between the react-native-safe-view-area module and the module it intends to install. Example, react-native-gesture-manipulator.

@ravics09
Copy link

ravics09 commented Dec 9, 2019

rm -rf node_modules/*/.git/

Its worked for me.

@FredericoVieira
Copy link

FredericoVieira commented Dec 13, 2019

I have to do this two steps to work!

Try it rm -rf node_modules/*/.git/. It works for me!
remove package-lock.json

Thanks!

@Zoha131
Copy link

Zoha131 commented Dec 14, 2019

rm -rf node_modules/*/.git/

1m silence for the windows users like me. 🙈 🙉 🙊

@iahmedbacha
Copy link

If still have this problem try:
rm -rf node_modules/**/*/.git/

@ilibilibom
Copy link

I tried

rm -rf node_modules/*/.git/

and still getting the same error ....
I don't seem to have a .git directory in

node_modules/react-native-safe-area-view

@iahmedbacha
Copy link

I tried

rm -rf node_modules/*/.git/

and still getting the same error ....
I don't seem to have a .git directory in

node_modules/react-native-safe-area-view

Try to clone the repo again (in another directory) and run npm install.

@ilibilibom
Copy link

I tried

rm -rf node_modules/*/.git/

and still getting the same error ....
I don't seem to have a .git directory in

node_modules/react-native-safe-area-view

Try to clone the repo again (in another directory) and run npm install.

How would this effect my project ?

@iahmedbacha
Copy link

I tried

rm -rf node_modules/*/.git/

and still getting the same error ....
I don't seem to have a .git directory in

node_modules/react-native-safe-area-view

Try to clone the repo again (in another directory) and run npm install.

How would this effect my project ?

It will not effect your project since you are just cloning it again.
Before you do that try to go to "./node_modules/react-native-safe-area-view/" and delete ./git directory manually.

@ilibilibom
Copy link

I tried

rm -rf node_modules/*/.git/

and still getting the same error ....
I don't seem to have a .git directory in

node_modules/react-native-safe-area-view

Try to clone the repo again (in another directory) and run npm install.

How would this effect my project ?

It will not effect your project since you are just cloning it again.
Before you do that try to go to "./node_modules/react-native-safe-area-view/" and delete ./git directory manually.

You can see in my first comment that I don't have a .got directory

@kirankbee
Copy link

i manually deleted .git folder and all the references to git in package.json
located under react_native_safe_area_view folder, it worked for me .

@VishwaNandhu
Copy link

i manually remove
node_modules and package-lock.json
then run command
npm cache clean --force
npm install --save
its work for me .

@infinitbility
Copy link

I tried

rm -rf node_modules/*/.git/

and still getting the same error ....
I don't seem to have a .git directory in

node_modules/react-native-safe-area-view

Delete your react-native-safe-area-view from node modules

@yesIamFaded
Copy link

What does -rf stand for because I cant run the command on windows ... It tells me that it doesnt know the command -rf

using windows 10

@kirankbee
Copy link

kirankbee commented May 11, 2020 via email

@yesIamFaded
Copy link

@kirankbee ok but somehow i still have the error..

@mkhoussid
Copy link

mkhoussid commented May 13, 2020

Running npx yarn add react-native-safe-area-view should fix it.
SO link.

@yesIamFaded
Copy link

yh thats the fix got it from stack yesterday !!! @mkhoussid

@JiangWeixian
Copy link

@Irislm thanks, save my day

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests