New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeatedly performing npm-install fails with EISGIT: Appears to be a git repo or submodule #13

Closed
sdduursma opened this Issue Oct 20, 2017 · 27 comments

Comments

Projects
None yet
@sdduursma

sdduursma commented Oct 20, 2017

When repeatedly performing npm install with a dependency on react-native-version-number, npm fails with the error code EISGIT.

I have declared a dependency on on react-native-version-number in my package.json like so:

  ...
  "dependencies": {
    "react-native-version-number": ">=0.2.0",
    ...
  },
  ...

Performing npm install for the first time succeeds. Performing npm install immediately again will fail:

$ rm -rf node_modules/
$ npm install
$ <installation succeeds>
$
$ npm install
npm ERR! path <path/to/project/root>/node_modules/react-native-version-number
npm ERR! code EISGIT
npm ERR! git <path/to/project/root>/node_modules/react-native-version-number: Appears to be a git repo or submodule.
npm ERR! git     <path/to/project/root>/node_modules/react-native-version-number
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

When inspecting the installed react-native-version-number module in node_modules, I found that the module contains a .git file.

Any help resolving this failure would be much appreciated. Thanks!

@alexgvozden

This comment has been minimized.

alexgvozden commented Oct 24, 2017

seems that project owner needs to remove git repository from the package...

@kkjdaniel

This comment has been minimized.

kkjdaniel commented Nov 1, 2017

+1 I am also having this issue. As @alexgvozden mentions, the package needs to be updated to remove the .git directory from the package. As a temporary fix for @sdduursma , just go into the directory and use rm -rf .git this will stop NPM complaining.

@karltaylor

This comment has been minimized.

karltaylor commented Nov 16, 2017

Any plans on this getting fixed?

@joncursi

This comment has been minimized.

joncursi commented Dec 13, 2017

Bump 😅

@neo125874

This comment has been minimized.

neo125874 commented Dec 22, 2017

@kkjdaniel 's solution got this work!

@unpokolokko

This comment has been minimized.

unpokolokko commented Jan 8, 2018

i solved this problem by removing it before performing npm install again as it suggests.

@viacheslav-gotsuliak

This comment has been minimized.

viacheslav-gotsuliak commented Jan 12, 2018

Having same issue

@mieszko4

This comment has been minimized.

mieszko4 commented Jan 23, 2018

Please fix it, I have the same issue

@tnyavdc

This comment has been minimized.

tnyavdc commented Jan 26, 2018

Bump

@evanjmg

This comment has been minimized.

evanjmg commented Jan 30, 2018

+1

@geekyDP

This comment has been minimized.

geekyDP commented Jan 31, 2018

Having same issue

@trietlam

This comment has been minimized.

trietlam commented Feb 4, 2018

same issue, and have to manually remove .git directory inside the package

@brickion

This comment has been minimized.

brickion commented Feb 5, 2018

+1

5 similar comments
@yutakaA

This comment has been minimized.

yutakaA commented Feb 14, 2018

+1

@IrfyNaz

This comment has been minimized.

IrfyNaz commented Feb 20, 2018

+1

@goldengecko

This comment has been minimized.

goldengecko commented Mar 1, 2018

+1

@VinceBT

This comment has been minimized.

VinceBT commented Mar 3, 2018

+1

@craig8two

This comment has been minimized.

craig8two commented Mar 12, 2018

+1

@SujitSingh SujitSingh referenced this issue Mar 13, 2018

Closed

support ionic #1

@keech

This comment has been minimized.

keech commented Mar 13, 2018

+1

@adrianboimvaser

This comment has been minimized.

adrianboimvaser commented Mar 13, 2018

Is this project dead?

@duongntb94

This comment has been minimized.

duongntb94 commented Mar 14, 2018

  • 1
@Lastin

This comment has been minimized.

Contributor

Lastin commented Mar 16, 2018

Related issue. #20
Fixed in: #24

@alvaromb

This comment has been minimized.

Member

alvaromb commented May 28, 2018

Sorry! Not dead, just very very busy.

This was merged & solved a while ago.

Thanks for reporting!

@VinceBT

This comment has been minimized.

VinceBT commented May 28, 2018

By the way could you also add these files to ignore in the .npmignore ?

They are useless for the user and it just makes your package heavier.

.idea
.eslintrc
.travis.yml
@alvaromb

This comment has been minimized.

Member

alvaromb commented May 29, 2018

Will try to do it later, @VinceBT. Cool avatar BTW 😉

@alvaromb

This comment has been minimized.

FabianLauer added a commit to FabianLauer/FSPromise that referenced this issue Sep 11, 2018

ignore git directory in npm package
Thi should fix `EISGIT` errors during `npm install`. The error happened with npm v6.2.0 (probably other versions as well) when `npm i` was run multiple times in a repo (e.g. for package updates). It did not matter whether the FSPromise package was installed as a direct dependency of the repo or as a 2nd level dependency.

A very similar problem was documented here:
APSL/react-native-version-number#13
@hadicodes

This comment has been minimized.

hadicodes commented Nov 14, 2018

+1 I am also having this issue. As @alexgvozden mentions, the package needs to be updated to remove the .git directory from the package. As a temporary fix for @sdduursma , just go into the directory and use rm -rf .git this will stop NPM complaining.

This^ worked for me since I had a custom module (not from) npm installed and it had a .git hidden folder tracking it. Thanks @kkjdaniel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment