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

The CLI --help command doesn't work #2520

Open
nirvdrum opened this issue Dec 16, 2021 · 0 comments
Open

The CLI --help command doesn't work #2520

nirvdrum opened this issue Dec 16, 2021 · 0 comments

Comments

@nirvdrum
Copy link

nirvdrum commented Dec 16, 2021

Intended outcome:

I was trying to figure out how to use the client:codegen subcommand. It directed me to use the --help option and no matter where I place it, I'm unable to get help output. I expected to see information about the command's flags, but instead received an error about a plugin.

Actual outcome:

> yarn apollo client:codegen
yarn run v1.22.17
$ /home/nirvdrum/dev/workspaces/taskerator/node_modules/.bin/apollo client:codegen
 ›   Error: Missing required flag:
 ›    --target TARGET  Type of code generator to use (swift | typescript | flow | scala | json | json-modern (exposes raw json types))
 ›   See more help with --help
error Command failed with exit code 2.
> yarn apollo client:codegen --help
yarn run v1.22.17
$ /home/nirvdrum/dev/workspaces/taskerator/node_modules/.bin/apollo client:codegen --help
    TypeError: plugin_help_1.getHelpClass is not a function
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

> yarn apollo --help client:codegen
yarn run v1.22.17
$ /home/nirvdrum/dev/workspaces/taskerator/node_modules/.bin/apollo --help client:codegen
    TypeError: plugin_help_1.getHelpClass is not a function
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

> yarn apollo --help
yarn run v1.22.17
$ /home/nirvdrum/dev/workspaces/taskerator/node_modules/.bin/apollo --help
    TypeError: plugin_help_1.getHelpClass is not a function
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

How to reproduce the issue:

  1. Create a new JS project.
  2. Install apollo as a dev dependency (e.g., yarn add -D apollo)
  3. Run help command: yarn apollo --help

Please note that the issue can be reproduced using npm instead of yarn.

Versions

Apollo: 2.33.9

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

1 participant