question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:34 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
delastevecommented, Oct 10, 2017

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.

2reactions
reasonablytallcommented, Oct 10, 2017

Getting this too. On a fresh install of node/npm.

@angular/cli — 1.4.5
node — 6.11.4
npm — 3.10.10
os — Windows 10 x64
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found