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

Module naming conflict #3

Closed
inspmoore opened this issue Dec 4, 2018 · 4 comments
Closed

Module naming conflict #3

inspmoore opened this issue Dec 4, 2018 · 4 comments

Comments

@inspmoore
Copy link

After adding react-native-selectmultiple-button to the project the compiler spitted out this error:

jest-haste-map: @providesModule naming collision:
Duplicate module name: react-animated
Paths: /Users/MoorePro/Devs/Project/scaffolding/node_modules/react-native-selectmultiple-button/node_modules/react-native/Libraries/Animated/release/package.json collides with /Users/MoorePro/Devs/Project/scaffolding/node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
ERROR
23:11
jest-haste-map: @providesModule naming collision:
Duplicate module name: react-animated
Paths: /Users/MoorePro/Devs/Project/scaffolding/node_modules/react-native-selectmultiple-button/node_modules/react-native/Libraries/Animated/release/package.json collides with /Users/MoorePro/Devs/Project/scaffolding/node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by a @providesModule declaration with the same name across two different files.

I'm running this on expo 2.4.0, nodejs 10.13.0

@danceyoung
Copy link
Owner

react-native-selectmultiple-button pacage does not contain Animated package.
You try deleting the folder node_modules within your project scaffloding, then npm install again

@inspmoore
Copy link
Author

Thanks @danceyoung for the reply. I tried it already and unfortunately this doesn't resolve the issue. The conflict is still there. Any other ideas?

@danceyoung
Copy link
Owner

@inspmoore Can you send a demo to my email danceyoung@hotmail.com.
Thanks

@ScottWallace
Copy link

For those who believe instead in the power of Github comments for issues' ability to serve a solution for everyone, instead of email, here's a temporary patch until the developer takes the time to fix this issue or deprecates the project.

Create a new file in the root of your project, called rn-cli.config.js and add this to it:

module.exports = {
  resolver: {
    blacklistRE: /node_modules\/.*\/node_modules\/react-native\/.*/,
  }
 };

From:
facebook/react-native#21242 (comment)

Note: If you're on Windows (bless your heart), you'll need a different pathing. Read further in the comments for that issue to see a recommendation that I've not tried, because I'm on a real computer.

Again, this is a temporary fix, not a solution. For the solution, fork the code, take five more minutes to study the problem, apply the package.json fix, then email all your friends. No, wait, don't email them, there's better ways. Like Github comments.

Anyhoo, for the God knows how many who quickly tried this very broken and abandoned project and walked away without emailing the developer for the solution, here's hoping you'll come back and read this. It's an excellent component, and I hope the developer will apply his emailed solution to it.

That's right, I'm lightheartedly gigging the developer for his use of email for support. Let's not do that. Email support is an abomination that Github is meant to solve.

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

3 participants