-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Naming collision error when running packager, caused by "lodash" and "yeoman-generator" #11200
Comments
You are building a mobile app that depends on a different version of |
@lacker To explain my problem more clearly think of it like this: My app has a dependency on
What I want to understand is if I have an Android dev background and there when we set our dependencies in Gradle we have the ability to exclude an internal dependency of a dependency if it doesn't match our needs. E.g.:
Do we have something similar for react? |
It seems like npm should solve this - react and react native don't really manage their dependencies themselves, they are just libraries that you use according to npm. How did you install your own version of yeoman-generator, which npm version are you using? |
@lacker - I am using npm v3.10.8 and node v7.0.0.
I am starting to think that this is more an |
Yeah I agree I think this sounds like an npm problem. I'm gonna close this under that theory but if you do figure out that it's a React Native thing please feel free to reopen! |
Thanks @lacker! I will do as you suggested if I figure out that this issue has any connection to React Native. |
@lacker - After looking more closely I found that it is expected for Looking through the As we can see in the initial logs I provided, the error is thrown by the I created a test project where I have the following dependencies for both cases:
but in both cases there are different versions of different nested modules installed, so I think we can exclude I don't have the right to reopen this issue. Could you do that please? Thanks! |
OK, I am reopening. I am not sure if this is a known issue - maybe @cpojer can comment on whether this is expected behavior in some sense of "expected". |
What does your Jest config look like? |
@cpojer I don't have any config for Jest. The error is thrown by |
Oh, this is inside of RNP (which also uses |
@cpojer Here is a vanilla React Native project where I only updated the |
I'm facing similar issues after upgrading dependencies of my RN app. Logs when starting the RN packager or jest:
package.json:
|
@cpojer Do you have any updates on the issue? Were you able to reproduce it using the repository I provided? Thanks! |
Would you mind upgrading to RN 0.39 or master to see if this issue still persists? |
I have about 532 of the following messages for different modules: I don't use lodash or yeoman-generator. This started appearing when I upgraded to latest React, RN, Jest, etc. as you can see in my package.json. @cpojer I am using 0.39.2 (the latest). Thought I should post this here after reading the thread and recommendations. { |
Upgrading a project to |
@MattyK14 I think it might be a similar symptom of a different problem. Would you mind opening a new issue? In particular it would be really useful to have a brief repro, for example if creating a new project with React Native Version X and upgrading to React Native Version Y doesn't work. |
@lacker I did a |
I see. Yeah that works a lot! @mkonicek is working on improving this tooling so I think/hope that failure mode will be fixed soon. |
Upgrading project to |
On react-native 0.42.0 as well and seeing a bunch of these, for example:
Which seems to be internal to react-native. |
Turns out after deleting node-modules and npm install a few times, these warnings went away. Not entirely sure that was what did it or not. |
I am getting a huge number of these naming collisions - I just installed react-navigation and tried running
|
I was getting this issue with an application where I install with "yarn install" , instead of npm install. I did npm install -g npm, sudo rm -rf node_modules, and ran npm install, ..npm deduped these files (yarn did not do any deduping)...and now i no longer get that error...perhaps that will help? |
Running |
Description
In my project I am using
"react-native": "0.36.0"
and among the dependencies:"lodash": "^4.15.0"
"yeoman-generator": "^0.24.1"
When using versions higher than
"^3.10.1"
for"lodash"
and"0.21.2"
for"yeoman-generator"
I get naming collisions on"lodash"
,"inquirer"
and"cli-width"
when running packager.Reproduction
Have the dependencies described above and run:
react-native start --reset-cache
Result:
Solution
Using the same versions for
"lodash"
and"yeoman-generator"
as the ones used inreact-native@0.36.0
(i.e."^3.10.1"
for"lodash"
and"0.21.2"
for"yeoman-generator"
) fixes the issue, but changing them is really not an option for me at the moment.Is there any other possible fix?
Additional Information
The text was updated successfully, but these errors were encountered: