最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - 'ng new my-app' error - Stack Overflow

programmeradmin7浏览0评论

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
发布评论

评论列表(0)

  1. 暂无评论