'ng new' fails
See original GitHub issueBug 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.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:34 (2 by maintainers)
Top Results From Across the Web
ng new fails with latest version of @angular/cli and npm #20719
When using the latest version of @angular/cli and npm the command ng new fails during dependencies installation. (but it's working fine with ...
Read more >ng new failing with Angular CLI 7.2.1 - Stack Overflow
ng new hello-ng-world. The command fails with following error. npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, ...
Read more >ng: command not found (Angular) error [Solved] | bobbyhadz
To solve the error "ng: command not found", install the angular cli package globally by running npm install -g @angular/cli@latest and restart your...
Read more >ng new throws error The Schematic workflow failed. See above
Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory I am getting this below error although I have a...
Read more >[Solved] npm ERR! ERESOLVE unable to resolve ... - YouTube
Got it. ✓ [Solved] npm ERR! ERESOLVE unable to resolve dependency tree. ng new app. node.js. 32K views 1 year ago.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.