-
Notifications
You must be signed in to change notification settings - Fork 113
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
Seems to be broken if you use with other CLI tools while using PNPM as package manager #1605
Comments
Never used CLI with this package manager. |
You shall start testing with it as it is pretty popular :P Anyway, mostly 99% of packages are working as is with PNPM, only CLIs are getting broken usually due to |
Overall GraphQL CLI + Codegen + Inspector add-ons are seem to be very fragile. I cannot specify, but on multiple occasions using those tools through the CLI wrapper, I end up getting issues, so currently I'm using those tools CLIs directly as, fortunately they're working as expected. I would rather keep init and few other commands unique to CLI in it, but rest would've removed for good to simplify maintenance. As because I think you folks at Guild are having so much products to maintain I see their quality is worsened overtime and is not as perfect as it used to be and in integration they're not working quite often which is annoying. |
Basically, I'm using
graphql-cli
in a PNPM Workspaces environment, and if fails with the error below for any other CLI Tool integration such ascodegen
,coverage
andvaldiate
. Usingcodegen
as standalone CLI works fine no matter their setup.PNPM resolves modules in a different way than
yarn
andnpm
I assume you may expect flattening and havinggraphql-codegen
to be available innode_modules/.bin
and just spawning the process like./bin/graphql-codegen <some-args>
relative to cwd, but it's not there due to PNPM resolution strategy so it fails.The obvious solution would be, to use the programmatic usage of CLIs tools mentioned above and not spawning the processes? Probably too much coding :)
I'm unsure :) From code I see that there are maybe some issues with the generator of sh file
./node_modules/./bin/graphql
that handles symlinks improperly?To Reproduce
Steps to reproduce the behavior:
Expected behavior
Everything is working fine. Or at least meaningful error message is there :)
Screenshots
Versions (please complete the following information):
graphql-cli
:4.1.0
Generated
graphql
bin fileThe text was updated successfully, but these errors were encountered: