mdbootstrap / material-design-for-bootstrap

Important! A new UI Kit version for Bootstrap 5 is available. Access the latest free version via the link below.
https://mdbootstrap.com/docs/standard/
MIT License
9.35k stars 1.15k forks source link

npm error EISGIT on npm install #221

Closed aabuhijleh closed 5 years ago

aabuhijleh commented 5 years ago

I use this module in my project and up until very recently it was working fine.

Now it causes this error on npm install in my project...

npm ERR! path /builds/aabuhijleh/electron_desktop/rb-services/node_modules/mdbootstrap
npm ERR! code EISGIT
npm ERR! git /builds/aabuhijleh/electron_desktop/rb-services/node_modules/mdbootstrap: Appears to be a git repo or submodule.
npm ERR! git     /builds/aabuhijleh/electron_desktop/rb-services/node_modules/mdbootstrap
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.

the issue is solved by

rm -rf node_modules/mdbootstrap/.git/

the git repository should be removed from the package.

mdbootstrap v4.7.4 used in electron OS: both Windows 7 and Ubuntu

mattonit commented 5 years ago

how can we recreate this issue?

aabuhijleh commented 5 years ago

For me, this is very simple to reproduce...

I created a clean empty project with npm init then

npm i mdbootstrap@latest

then firing npm install produces that EISGIT error because the .git/ folder in included in the package.

if you installed mdbootstrap@4.7.3 you won't get this error because the .git/ folder is not included in that package

mattonit commented 5 years ago

It's an awful issue, but with the next update we'll fix it up

isabasan commented 5 years ago

its 4.7.6 now and issue is still open.

npm ERR! code EISGIT
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
aabuhijleh commented 5 years ago

This seems to be resolved in @4.8.0.

ImAbhishekTomar commented 5 years ago

@aabuhijleh - Thanks for the solution...

rami-sweyri commented 5 years ago

+1

deepankarsandy commented 5 years ago
npm install --save react-native-markdown-renderer
npm ERR! path /Users/user/Source/tikkl/app/node_modules/react-native-push-notification
npm ERR! code EISGIT
npm ERR! git /Users/user/Source/app/node_modules/react-native-push-notification: Appears to be a git repo or submodule.
npm ERR! git     /Users/sandy/Source/app/node_modules/react-native-push-notification
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/user/.npm/_logs/2019-06-07T04_08_53_731Z-debug.log
rahulnainwal107 commented 4 years ago

i am geting the same error @deepankarsandy

deepankarsandy commented 4 years ago

You need to rm -rf .git from that node modules directory, that solved my issue