Repeatedly performing npm-install fails with EISGIT: Appears to be a git repo or submodule
See original GitHub issueWhen 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:
- Created 6 years ago
- Reactions:50
- Comments:43 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+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 userm -rf .git
this will stop NPM complaining.seems that project owner needs to remove git repository from the package…