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

Ember Addons Name Conflict #17997

Closed
bajcmartinez opened this issue May 1, 2019 · 3 comments
Closed

Ember Addons Name Conflict #17997

bajcmartinez opened this issue May 1, 2019 · 3 comments

Comments

@bajcmartinez
Copy link

Hi everyone, I'm facing a big issue due to dependencies that idk how to resolve. I've been going through this quite a bit but still stuck. Hopefully, someone here can help me.

My project is running on ember 2.x.x and has installed several dependencies out of which one that is widely used in the app is:

https://github.com/btecu/ember-select

Now, my company is integrating another solution that comes with an ember addon which contains the following library as a dependency:

https://github.com/adopted-ember-addons/emberx-select

both of them are dropdowns, so far so good, but now, both of them have the same component name, so when I install the new addon, my old dropdowns stop working. Is there any solution for this other than forking one of the projects and rename the addon?

Thanks so much, I will really appreciate any help on this.

@lukemelia
Copy link
Member

@bajcmartinez I would suggest trying to re-export the components in your app's app tree with distinct names. Something like creating the following two files in your app::

// app/components/x-select.js
export { default } from 'ember-select/components/x-select';

and

// app/components/emberx-select
export { default } from 'emberx-select/components/x-select';

Then use the component from ember-select as {{x-select ...}} and the componet from emberx-select as {{emberx-select ...}}

@lukemelia
Copy link
Member

BTW, this is probably a better question for StackOverflow than this repository.

@bajcmartinez
Copy link
Author

hi @lukemelia thanks for your response, I did a small test case with this and seems to be working fine. I'll do the changes on my main project now and test it there.
And thanks for the tip on StackOverflow, I posted it on discord as well but with no luck that's why I came here.

I'll close the ticket as done :)

backspace added a commit to hashicorp/nomad that referenced this issue Jul 8, 2019
Thanks to @lukemelia for this suggestion on handling component
name overlaps:
emberjs/ember.js#17997 (comment)
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

2 participants