-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
@types/zen-observable missing in dependencies list #8688
Comments
@onichandame I would very much hope https://github.com/apollographql/zen-observable-ts (a package we control) can abstract away these concerns without help or oversight from Apollo Client. From your perspective, is there anything It would be shame to require any package using What more can |
I am not sure how and why the reference line is generated. will look into it after work. |
I wonder if there's a way we could just remove |
This allows us to remove the `@types/zen-observable` package entirely, which should help with apollographql/apollo-client#8688.
I think that idea might work! apollographql/zen-observable-ts#152 |
…pes/zen-observable` (#8695) Includes apollographql/zen-observable-ts#152 Should fix #8688
@onichandame Can you try with /// <reference types="zen-observable" /> so I'm hopeful your issue will be solved. |
My project has switched from PnP to node modules for ESM support, so I cannot reproduce the error in the original project. Having tested |
Problem
This lib is compiled to use
@types/zen-observable
as a shadow dependency. This won't be a problem in node_modules as@apollo/client
->zen-observable-ts
->@types/zen-observable
.But it throws when used with yarn v2 PnP where shadow dependency is strictly forbidden. An example output is:
There are dozens of such errors. After a quick glance at the code, I found that the source code does not use the shadow dependency at all, it is solely a result of the ts compilation.
Workaround
yarn v2 provides a way to patch the deps of packages:
Solution
As simply patching
@apollo/client
with a dependency eradicates the errors, the straight forward solution would be fixing the dependencies list.I have found a relating issue #2405 . It was once fixed but now on master branch the dependencies are removed again.
The text was updated successfully, but these errors were encountered: