Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM install issue #7

Closed
Noitidart opened this issue Dec 1, 2017 · 18 comments
Closed

NPM install issue #7

Noitidart opened this issue Dec 1, 2017 · 18 comments

Comments

@Noitidart
Copy link

Noitidart commented Dec 1, 2017

For some reason, I cannot install (npm i) other packages while this package is installed. I get the error below. I have to first npm un react-native-material-menu and then install the other package then I can install this back. Is this just me?

Environment

Environment:
OS: Windows 10
Node: 8.4.0
Yarn: 0.19.1
npm: 5.4.2
Watchman: Not Found
Xcode: N/A
Android Studio: Version 2.3.0.0 AI-162.3764568

Packages:
react: 16.0.0
react-native: 0.47.1

Error

PS C:\Users\Mercurius\Documents\GitHub\trustedplatform_android> npm i react-native-carousel-pager
npm ERR! path C:\Users\Mercurius\Documents\GitHub\trustedplatform_android\node_modules\react-native-material-menu
npm ERR! code EISGIT
npm ERR! git C:\Users\Mercurius\Documents\GitHub\trustedplatform_android\node_modules\react-native-material-menu: Appears to be a git repo or submodule.
npm ERR! git C:\Users\Mercurius\Documents\GitHub\trustedplatform_android\node_modules\react-native-material-menu
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! C:\Users\Mercurius\AppData\Roaming\npm-cache_logs\2017-12-01T18_53_56_927Z-debug.log

@mxck
Copy link
Owner

mxck commented Dec 2, 2017

@Noitidart can you fully remove node_modules folder?
rm -rf node_modules
then run
npm install or yarn

@Noitidart
Copy link
Author

Thanks mxck! I will try that on Monday please :)

@Noitidart
Copy link
Author

Thanks so much @mxck for leaving this open for me. I haven't been able to fix this. I'm not sure why. I'll close this out. It seems something specific to me. Thanks very much again. I'll update you when I find a fix. :)

@Noitidart
Copy link
Author

Oh just an update to the stuff I tried:

  • the rm -rf node_modules then npm i
  • created a new react native project react-native init and tried it here

Same results in both. Will keep you updated.

@Noitidart
Copy link
Author

@mxck Im still having this problem even in new project.

I was wondering what was the equivalent of rm -rf node_modules in windows, do you know please?

@kcbar
Copy link
Contributor

kcbar commented Jan 24, 2018

I had this issue. I switched to using yarn instead of npm and it doesn't happen anymore.

@Noitidart
Copy link
Author

@kcbar that's an interesting note. It would be nice to find the root cause though.

@mxck
Copy link
Owner

mxck commented Jan 25, 2018

Ok, I reopen ticket and test with NPM

@mxck mxck reopened this Jan 25, 2018
@mxck mxck changed the title Having to npm uninstall before installing other packages NPM install issue Jan 25, 2018
@Noitidart
Copy link
Author

Thanks @mxck!

@mxck
Copy link
Owner

mxck commented Jan 28, 2018

@Noitidart I don't have any errors at my Mac with npm.

❯ npm --version
5.6.0

What version you using?

@Noitidart
Copy link
Author

@mxck I am on windows, also 5.6.0

@DevAlien
Copy link

@mxck I'm on mac, it happens when I run npm install a second time, the first time goes well.

I think the issue is that in the package we get from npm there's a .git folder, you should not package that one.

Removing the .git directory inside node_modules/react-native-material-menu works

rm -rf node_modules/react-native-material-menu/.git

@mxck
Copy link
Owner

mxck commented Jan 31, 2018 via email

@DevAlien
Copy link

Thanks to you man, if you solve it would be very good for us :)

@mxck
Copy link
Owner

mxck commented Feb 1, 2018

By default, the following paths and files are ignored, so there's no need to add them to .npmignore explicitly:

.*.swp
._*
.DS_Store
.git
.hg
.npmrc
.lock-wscript
.svn
.wafpickle-*
config.gypi
CVS
npm-debug.log

Hmm. Something goes wrong. :)

@mxck
Copy link
Owner

mxck commented Feb 1, 2018

Fixed in c398fc4

@mxck mxck closed this as completed Feb 1, 2018
@mxck
Copy link
Owner

mxck commented Feb 1, 2018

NPM have a bug with it npm/npm#19073
Publish last version with yarn :)

@Noitidart
Copy link
Author

Woohoo it works!!! Thanks all!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants