Remove .git file from node package
See original GitHub issueIssue: 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:
- have an existing react native project
- execute
npm install react-native-udp
- 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:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top 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 >
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 Free
Top 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
published 2.6.1 with fix
@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 !