"ng new my-app"错误 [英] 'ng new my-app' error
本文介绍了"ng new my-app"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用最新版本的Angular生成一个新的项目和框架应用程序.我尝试使用以下方法卸载并重新安装Angular CLI:
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
尝试在命令提示符下运行"ng new my-app"时发生此错误:
This error occurs when trying to run 'ng new my-app' in command prompt:
'Error: The command "new" has an option without the required type and name field'
感谢您为解决此问题提供的任何帮助.
Any help to resolve this issue is appreciated.
推荐答案
这是一个已知问题,而github中对此也提出了一个问题.
This is a known issue and there is an issue raised in github for this.
https://github.com/angular/angular-cli/issues/7984
尝试以下命令:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
这篇关于"ng new my-app"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文