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

@uirouter/react and @uirouter/angularjs should be peerDependencies #4

Open
alexgerv opened this issue Sep 30, 2017 · 2 comments
Open

Comments

@alexgerv
Copy link

@uirouter/react and @uirouter/angularjs are included directly in this project. However, if one of these libraries are included in the package.json of the app, this causes a clash because all the globals (for example location services, $q, etc.) will not be populated.

alexgerv pushed a commit to alexgerv/react-hybrid that referenced this issue Oct 29, 2017
…er dependencies

Since @uirouter/core is stateful, having a different version of @uirouter/angularjs or
@uirouter/react in the user project would cause some very hard to debug issues. Moving them to peer
dependencies instead forces the versions to be the same. Also, the interfaces to the core API are
now safely available in the user project. Fixes ui-router#4.
@dmnn
Copy link

dmnn commented Apr 16, 2019

@christopherthielen I'm also having a similar issue with this. Currently I don't see how we can practically use @uirouter/react-hybrid without referencing @uirouter/react or @uirouter/angular for the typescript types alone. But in our case we are also using angular state events still and swapping to this wont work per the examples because services.q ends up undefined and I get: TypeError: Cannot read property 'when' of undefined
at ReactViewConfig.load (reactViews.js?76f8:54)

Is there any work around for these issues that you know of?

@christopherthielen
Copy link
Member

I guess I don't understand the problem. Because the package has a hard dependency on the supported versions, you don't have to add them at the top level. Additionally, they should be hoisted to the top level by either yarn or npm so the typings should be available. Can you provide further details?

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