-
Notifications
You must be signed in to change notification settings - Fork 470
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
Yarn V2 compatibility #1850
Comments
Hi. Is there any status on this, or guide on how to use with Yarn 2? |
In Yarn 2, when I run
It still appears to be functioning as we need it to. It creates the generated type files. But it outputs a bunch of non-blocking errors. VersionsTested with |
I'm able to get past this by temporarily patching
I don't see why the plugin loader doesn't just use |
@snasirca Does this mean it's an oclif issue then? Maybe worth filing a bug on https://github.com/oclif/config/issues ? |
I think this is a oclif issue - there's even a PR to fix this already: oclif/config#171 but it seems like the repository doesn't get much love as this has been open for several months. Until then, as a quick fix I had some luck with using pnpify to wrap the tool: https://yarnpkg.com/advanced/pnpify/
|
Thanks @dc-pm - that worked well! |
any update on this, also experiencing it |
no luck with @yarnpkg/pnpify either
|
It seems to me that the For example, But you can see right on the first line of this file that it's using
Yarn PnP doesn't like this. When you try to run the codegen script you'll get an error like this:
One workaround is to use yarn's
Apparently all of these dependencies are imported, even if you're generating code for a single language. So all of these entries were necessary to get it to run. The
It would be nice for Ultimately even if the oclif errors are resolved, based on what I've described here I think apollo needs to update their various -- |
It seems this issue was solved in It'd be great if apollo could bump the version of oclif to |
It would be great to have the version bumped! But in the meantime you can just use yarn resolutions to get the updated version. Also, you may need to patch the package.json of some of the oclif plugins that do not specify the |
Intended outcome:
apollo commands should work normally when using Yarn V2 with Plug'n'Play
Actual outcome:
It fails with the following:
How to reproduce the issue:
Bootstrap any Yarn V2 project, add the apollo dependency and run any apollo command.
Versions
Tested with 2.21.2 and latest (2.25.0)
The text was updated successfully, but these errors were encountered: