Issue Description
Within my current project, I am utilizing "react-native": "0.36.0"
along with the following dependencies:
"lodash": "^4.15.0"
"yeoman-generator": "^0.24.1"
Upon using versions above "^3.10.1"
for "lodash"
and "0.21.2"
for "yeoman-generator"
, there were conflicts in names like "lodash"
, "inquirer"
, and "cli-width"
when running packager.
Steps to Reproduce
To replicate this issue, ensure you have the mentioned dependencies and execute: react-native start --reset-cache
Expected Result:
jest-haste-map: @providesModule naming collision:
Duplicate module name: inquirer
Paths: /CoolProject/node_modules/react-native/node_modules/yeoman-generator/node_modules/inquirer/package.json collides with /CoolProject/node_modules/react-native/node_modules/inquirer/package.json
...
This warning is caused by a @providesModule declaration with the same name across two different files.
Possible Solutions
One possible workaround is to maintain the same versions of "lodash"
and "yeoman-generator"
as indicated in the
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0f7d6a6e6c7b22616e7b66796a">[email protected]</a>
(i.e. "^3.10.1"
for "lodash"
and "0.21.2"
for "yeoman-generator"
). However, modifying these versions may not be feasible at the moment due to dependency relationships.
Are there any alternative solutions available?
Thank you!
Updates
For further information regarding this issue, refer to the GitHub issue I filed under the react-native
repository: https://github.com/facebook/react-native/issues/11200
Additional Update
After upgrading react-native
to version 0.39, the problem was resolved. The fix seems to involve removing the seemingly redundant (and potentially outdated) yeoman-generator
dependency: https://github.com/facebook/react-native/commit/1fd7a574ba538d05da4be841c84a70766464ec13