javascript - 'ng new my-app' 错误

标签 javascript node.js angular command-line-interface

我正在尝试使用最新版本的 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/

相关文章:

javascript - 如何有一个不在滚动对象旁边的滚动条?

asp.net - 查找 JS 错误 - "Stop running this script?"

javascript + 根据键组合 json 数组,

javascript - 从函数 A 中获取 JSON 并将其传递给 angular2 中的函数 B

javascript - Polymer:我究竟应该把我的 Javascript 放在哪里?

javascript - 函数未定义,即使它是

node.js - Sequelize 预加载错误

node.js - 使用 NodeJs 使用 imagemagick 平铺图像

css - :root selector is not working in the Angular component

html - 使用 ""和 ' ' 分配标签之间的差异