admin管理员组

文章数量:1327750

I am trying to generate a new project and skeleton application using the latest version of Angular. I have tried uninstalling and reinstalling Angular CLI using:

C:\>npm install -g @angular/cli@latest
C:\>ng --version

@angular/cli: 1.4.5
node: 8.8.1
os: win32 x64

This error occurs when trying to run 'ng new my-app' in mand prompt:

'Error: The mand "new" has an option without the required type and name field'

Any help to resolve this issue is appreciated.

I am trying to generate a new project and skeleton application using the latest version of Angular. I have tried uninstalling and reinstalling Angular CLI using:

C:\>npm install -g @angular/cli@latest
C:\>ng --version

@angular/cli: 1.4.5
node: 8.8.1
os: win32 x64

This error occurs when trying to run 'ng new my-app' in mand prompt:

'Error: The mand "new" has an option without the required type and name field'

Any help to resolve this issue is appreciated.

Share Improve this question edited Oct 30, 2017 at 18:18 asaaki 2,00019 silver badges23 bronze badges asked Oct 30, 2017 at 17:06 Nicholas GrahamNicholas Graham 9487 silver badges12 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

This is a known issue and there is an issue raised in github for this.

https://github./angular/angular-cli/issues/7984

Try below mands:

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest

After these steps:

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest

Do:

npm install @schematics/angular

And then:

ng new appname

本文标签: javascript39ng new myapp39 errorStack Overflow