-
Notifications
You must be signed in to change notification settings - Fork 12k
ng <command> --help does not work #16241
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
Comments
Are you trying to run this from inside a Angular project? Or globally , to use ng generate --help you need to be inside an Angular workspace. Let me know if that works, we can update the docs if needed. |
Yep, that was the problem. Outside of an angular project, Although this might be a source of misunderstanding. Using the --help flag produces a different error than using the command itself: Best solution could be updating the error message a bit maybe. Thank you for the help! |
That's a good suggestion @alan-agius4 what's your thought on this? |
We should fix this 😊 |
Please try to update the docs also because it can create a problem for person like me who is new in angular. Thanks. cli#basic-workflow |
Oh I believe it is really confused people who just new to angular cli and might be a kinda blocker for some, so this Here is the list of commands that does not work outside the angular project #19057:
|
With this change we refactor the Angular CLI and replace the underlying args parser and command builder. We choose to use Yargs as our parser and command builder of choice. The main advantages of Yargs over other command builders are; - Highly configurable. - We already use it in other packages such as the compiler-cli/dev-infra etc.. - Commands and options can be added during runtime. This is a requirement that is needed to support architect and schematics commands. - Outstanding documentation. - The possibility to parse args without parser configuration (Free form). - Commands are built lazily based on the arguments passed. BREAKING CHANGE: Several changes in the Angular CLI commands and arguments handling. - `ng help` has been removed in favour of the `—-help` option. - `ng —-version` has been removed in favour of `ng version` and `ng v`. - Deprecated camel cased arguments are no longer supported. Ex. using `—-sourceMap` instead of `—-source-map` will result in an error. - `ng update`, `—-migrate-only` option no longer accepts a string of migration name, instead use `—-migrate-only -—name <migration-name>`. - `—-help json` help has been removed. Closes #20976, closes #16614 and closes #16241
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Affected Package
The issue is caused by package @angular/cli
Is this a regression?
not sure.
Description
Angular cli commands seems to be working, but the --help flag does not work in them in angular 8. It is suggested in the documentation in multiple places that it should.
🔬 Minimal Reproduction
(
npm uninstall -g @angular/cli
)npm install -g @angular/cli@latest
ng generate --help
🔥 Exception or Error
forest@forest:~$ ng generate --help
forest@forest:~$ cat /tmp/ng-MYDOue/angular-errors.log
🌍 Your Environment
Angular Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: