Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Issue Description

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!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:50
  • Comments:43 (1 by maintainers)

github_iconTop GitHub Comments

kkjdanielcommented, 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.

alexgvozdencommented, Oct 24, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing the EISGIT npm appears to be a git repo or submodule ...
Fixing the EISGIT npm appears to be a git repo or submodule Error. This happened when i was deploying an app to heroku....
Read more >
code EISGIT ... node_modules/sitemap: Appears to be a git ...
It doesnt like that you have a git submodule. In your case .git in sitemap. So go to your proeject folder and navigate...
Read more >
How to Utilize Submodules within Git Repos - Bits and Pieces
Here's a screenshot of what my submodule repo looks like, it's currently very simple: an images/ folder, a samplePosts/ folder and (eventually) ...
Read more >
How to Solve `'git/index.lock': File exists` Error in Submodules
Suddenly, when you try to add changes to the staging area, it fails. Then, you figure out that you cannot perform the common...
Read more >
GitHub integration with Azure Pipelines - Azure DevOps Labs
Very similar issue here. Microsoft??? Any response. The build seems to work until we add the testing steps... then the npm install step...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found