angular-cli: 'ng new' fails
Bug Report
Versions
@angular/cli — 1.4.5
node — 7.2.1
npm — 5.4.2
os — win32 x64 (Windows 10)
Repro Steps
ng new sample-app
The log given by the failure
C:\Development>ng new sample-app
The command "new" has an option without the required type and name fields.
Error: The command "new" has an option without the required type and name fields.
at Class.validateOption (C:\Users\username\AppData\Roaming\npm\node_modules\@angular\cli\ember-cli\lib\models\command.js:377:13)
at Array.map (native)
at Class.registerOptions (C:\Users\username\AppData\Roaming\npm\node_modules\@angular\cli\ember-cli\lib\models\command.js:163:27)
at getOptionsTask.run.then (C:\Users\username\AppData\Roaming\npm\node_modules\@angular\cli\commands\new.js:95:18)
Other details that might be useful
I have used npm to uninstall @angular/cli and reinstall it globally.
Other commands also fail with the same error. For example ng g component some-new-component
also throws the error:
The command "generate" has an option without the required type and name fields.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 12
- Comments: 34 (2 by maintainers)
Just spoke with @hansl - he reverted the last commit to https://github.com/angular/devkit. I just tested after reinstalling the CLI and everything is back to working.
Getting this too. On a fresh install of node/npm.
Fixed by reverting the faulty PR. We’ll need to be more careful when untangling the Schematics from the CLI. Closing this as fixed.