question-mark
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.

Remove .git file from node package

See original GitHub issue

Issue: cannot use npm install after installing react-native-udp

Output:

npm ERR! path /Users/louis/Documents/alphainsideapp/node_modules/react-native-udp npm ERR! code EISGIT npm ERR! git /Users/louis/Documents/alphainsideapp/node_modules/react-native-udp: Appears to be a git repo or submodule. npm ERR! git /Users/louis/Documents/alphainsideapp/node_modules/react-native-udp 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/louis/.npm/_logs/2019-05-22T11_53_29_560Z-debug.log

Reproduce:

  1. have an existing react native project
  2. execute npm install react-native-udp
  3. install any other node package

Workaround:

  • delete /node_modules/react-native-udp/.git

or

  • delete /node_modules
  • execute npm install to install all packages simultaniously # #

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mvayngribcommented, May 29, 2019

published 2.6.1 with fix

0reactions
SoulKacommented, May 29, 2019

@Sbphillips19 Are you using Windows or Linux/Mac? Since the .git folder starts with a dot, it is hidden. On Windows you can check “show hidden folders” on the file browser. On Mac or Linux just run ls -a in the root of the node package “react-native-udp”.

EDIT: Since the issue is fixed now, it would be the easiest to just reinstall the package with the new update. Thanks @mvayngrib !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove node_modules from git in vscode - Stack Overflow
Create a file .gitignore · Add node_modules/* line to gitignore file · Run the below commands in Your terminal git rm -r --cached...
Read more >
How to remove node_modules - gists · GitHub
Check for an existing .gitignore file in the project directory · If your project directory has a . · Open up the ....
Read more >
git remove node module Code Example - Code Grepper
Do the below steps - # Make .gitignore file. # Run below commands in your terminal git rm -r --cached node_modules git commit...
Read more >
How To Delete File on Git - devconnected
The easiest way to delete a file in your Git repository is to execute the “git rm” command and to specify the file...
Read more >
How to remove a file with Node.js - Flavio Copes
How do you remove a file from the filesytem using Node.js? Node offers a synchronous method, and an asynchronous method through the fs...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found