我正在尝试使用最新版本的 Angular 生成一个新项目和骨架应用程序。我尝试使用以下方法卸载并重新安装 Angular CLI:
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”时出现此错误:
'Error: The command "new" has an option without the required type and name field'
感谢任何解决此问题的帮助。
最佳答案
这是一个已知问题,github 中为此提出了一个问题。
https://github.com/angular/angular-cli/issues/7984
尝试以下命令:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
关于javascript - 'ng new my-app' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47020670/